forked from adazzle/react-data-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (adazzle#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 <[email protected]> * Update src/hooks/useViewportRows.ts Co-authored-by: Nicolas Stepien <[email protected]> * 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 <[email protected]> * Fix typo * Add rowHeight tests * typo Co-authored-by: Nicolas Stepien <[email protected]>
- Loading branch information
1 parent
e845d20
commit 2eb35ab
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.