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

Inconsistent reloading of visible rows on column width change or reorder #2

Open
dstevick41 opened this issue Dec 9, 2015 · 0 comments

Comments

@dstevick41
Copy link

After fixing the column header width issue I found that changing the column width or changing it's position does not always reload the visible rows (using Sproutcore 1.11). The visible rows retain the original width and position. Scrolling the view or clicking on the visible rows does cause them to reload but looks odd.

Clicking on a row and scrolling up and down prior to attempting the width or order change causes it to work properly. Resort a column so the data reloads and it to goes back to the original behavior where the rows do not reload properly.

The reload() function in SC.TableView is not causing the rows to be rendered via the SC.TableRowView render() or update() functions. This seems to be an issue down in the SC.CollectionView where if the exampleView is pooled and the content doesn't change the rows are not reloaded.

Setting isReusable to false stops the row views from being pooled and fixes the problem for me. I am using the default cell content via the renderTableCellContent(). My cells are simple divs around simple text so redrawing the visible cells every time is not expensive. This might be a problem for more elaborate cell layouts.

I looked into turning off isReusable temporarily during a column resize or reorder but this appeared complicated. I was wondering if you have any suggestions.

By the way the jslewis SCTable (https://github.com/jslewis/sctable) has this same problem with Sproutcore 1.11.

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

No branches or pull requests

1 participant