-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for variable row heights (#2384)
* Change rowHeight to a function to support variable row heights * Fix hooks order * Remove memo * Add a comment * Fix tests * Fix types * Cleanup * Use a single array * Fix pageup/pagedown * Update src/DataGrid.tsx Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * Update src/hooks/useViewportRows.ts Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * newScrollTop -> nextRowY * move/deduplicate getRowTop(rowIdx) and getRowHeight(rowIdx) calls outside the ifs * Validate rowIdx * Update src/hooks/useViewportRows.ts Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * Fix typo * Add rowHeight tests * typo Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
- Loading branch information
1 parent
2e85a44
commit c18dd2c
Showing
10 changed files
with
238 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.