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(react-grid): optimize table selection rendering #412

Merged
merged 2 commits into from Oct 16, 2017

Conversation

SergeyAlexeev
Copy link
Contributor

@SergeyAlexeev SergeyAlexeev commented Oct 16, 2017

Fixes #397

@SergeyAlexeev SergeyAlexeev merged commit b0dfae1 into DevExpress:master Oct 16, 2017
@SergeyAlexeev SergeyAlexeev deleted the table-selection-perf branch October 16, 2017 18:35
@DanHarman
Copy link

@SergeyAlexeev Not sure if this fix is published yet, but I see the whole table redraw on row selection regardless of 'highlightSelected' being set on the TableSelection? So even though rows remains the same the whole virtual table will redraw on row click, rather than just the affected rows.

<Grid getRowId={getRowId} rows={this.props.orders} columns={ColumnDefinitions.columns}>
    <DateTimeTypeProvider />
    <SortingState />
    <SelectionState selection={[this.props.selection]} onSelectionChange={this.handleSelectionChange} />
    <LocalSorting />

    <VirtualTableView />

    <TableSelection highlightSelected selectByRowClick showSelectionColumn={false} />
    <TableColumnResizing defaultColumnWidths={ColumnDefinitions.defaultColumnWidths} />
    <TableHeaderRow allowResizing allowSorting />
</Grid>

Is this intentional as the click handling seems a little slow.

@SergeyAlexeev
Copy link
Contributor Author

Yes, there are some recalculations because of the react diffing algorithm. But, it should not cause any performance issues. We tested the scenario you described with a huge amount of data and it works sufficiently well. If you have a sample that works inadequately, please provide us with it.

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.

None yet

3 participants