Skip to content

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

@dstevick41

Description

@dstevick41

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions