Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TableStrategy): correctly determine first row #131

Closed
wants to merge 1 commit into from

Conversation

bigopon
Copy link
Member

@bigopon bigopon commented Apr 19, 2018

fixes #128
fixes #84

From discussion in #46, I think buffer will never stay inside table, so I think this fix is fine. If it's to be changed, this needs to be revised.

About test, i'm not sure what to add


For folks who are affected by this, you have to temporarily modify the node_modules/aurelia-ui-virtualization as TableStrategy is not exported. Waiting for @EisenbergEffect @AStoker to review and release.

@avrahamcool
Copy link

I'm not able to test this with my project. (I'm not sure what file should I be changing).
I'm using a default esnext 0.33.1 cli project (webpack).

but wouldn't it break if the first element of the tbody is actually a fixed one?

<table>
    <tr>
      <th>Index</th>
      <th>Text</th>
    </tr>
    <tbody>
      <tr>
        <td>FIXED ROW 1 INDEX</td>
        <td>FIXED ROW 1 TEXT</td>
      </tr>
      <tr virtual-repeat.for="item of arr">
        <td>${item.index}</td>
        <td>${item.text}</td>
      </tr>
    </tbody>
  </table>

@bigopon
Copy link
Member Author

bigopon commented Apr 20, 2018

If you are using webpack, the file should be node_modules/aurelia-ui-virtualization/dist/native-modules/template-strategy (or you can search within the folder the block: TableStrategy)

if it's requirejs / systemjs, then it's node_modules/aurelia-ui-virtualization/dist/amd/template-strategy


but wouldn't it break if the first element of the tbody is actually a fixed one?

I think so, not sure how to handle this scenarios though

@avrahamcool
Copy link

avrahamcool commented Apr 22, 2018

@bigopon
I've tested it in my project - it works fine when I have only rows that are created by the virtual-repeat.
but if I have some fixed rows, and then other rows with the virtual-repeat, the fixed rows disappear after I scroll.

@bigopon
Copy link
Member Author

bigopon commented Jul 17, 2018

@avrahamcool We can't have scrollbar within <tbody/>, can we ? If so, I think the usage you described is not possible to support. I hope I'm wrong and wish to see some possible way to tackle this.

@avrahamcool
Copy link

@bigopon I think you are right..
but in this case - the virtual repeat should not delete my fixed rows..

@bigopon
Copy link
Member Author

bigopon commented Jan 15, 2019

superseded by #140

@bigopon bigopon closed this Jan 15, 2019
@bigopon bigopon deleted the fix-table-repeat branch January 15, 2019 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrolling up/down with table and virtual-repeat-for causes display bugs Tables not rendering correctly
2 participants