-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[DataGrid] Fix scroll jumping #14929
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
58d6d96
refactor: use ResizeObserver properly
romgrk bb6ac4c
refactor: stricter sizes type
romgrk 09551f5
refactor: remove overly defensive guard
romgrk 7e79260
fix: typings
romgrk bcbdf42
lint
romgrk 752ac5e
fix(rowsMeta): use invalidation instead of debounce
romgrk 7fbfa20
refactor: observeRowHeight
romgrk a758941
refactor: useGridRowsMeta
romgrk 45f5118
refactor
romgrk 6ee9114
refactor: deprecation notes
romgrk f4be24d
lint
romgrk 03a23bc
lint
romgrk ef2cc4a
fix: hydration bug
romgrk f6304ed
fix: detail panels
romgrk ef54cd6
fix: render effects
romgrk 870eabc
Merge branch 'master' into fix-scroll-jump
romgrk 989e415
Merge branch 'master' into fix-scroll-jump
romgrk d187edd
refactor: remove setRowHeight
romgrk 332d12e
lint
romgrk 4564639
fix: ugly fix
romgrk 4f7f57f
fix: store update sync issue
romgrk 63ab08b
ci: run (empty commit)
romgrk 37ffcf5
lint
romgrk f8468bd
lint
romgrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
20 changes: 20 additions & 0 deletions
20
packages/x-data-grid/src/hooks/features/rows/gridRowsMetaInterfaces.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { GridRowId } from '../../../models/gridRows'; | ||
|
||
export type HeightEntry = { | ||
content: number; | ||
spacingTop: number; | ||
spacingBottom: number; | ||
detail: number; | ||
|
||
autoHeight: boolean; | ||
needsFirstMeasurement: boolean; | ||
}; | ||
|
||
export type HeightCache = Map<GridRowId, HeightEntry>; | ||
|
||
export interface GridRowsMetaInternalCache { | ||
/** | ||
* Map of height cache entries. | ||
*/ | ||
heights: HeightCache; | ||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sidenote but the detail panels code is terribly unefficient. IIUC, it calls
getDetailPanel(Height|Content)
for all the rows of the grid, regardless if they're displayed or not. For large datasets, the performance must be horrible.