-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add column.colSpan prop #2356
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
Merged
Merged
Add column.colSpan prop #2356
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
aa82e54
Add column.colSpan prop
8e3c000
Change colSpan signature
ec27a71
Handle keyboard navigation
5895ccd
Add comments
ac6fe76
Update example
12a68f8
Handle frozen columns
3b6bd13
Handle header and summary rows
9dd16f1
Update example
7eed169
Update viewport columns to handle colspan
c08734f
Add ColumnSpanning example
6535db7
Cleanup cell selection logic
ace6346
Update src/utils/index.ts
amanmahajan7 8c5dc3e
Update src/utils/index.ts
amanmahajan7 0e69e0c
Remove unused import
535b6a0
Check integer and non negative values
f918583
Move to cell selection logic to DataGrid
54e4f53
Update src/utils/index.ts
amanmahajan7 13d28f1
Tweak colors
30fe74d
Fix eslint warning
96416e2
Split into two useMemos, fix startIdx
9b8b5bd
Check header and summary rows
4a1461c
Fix next position logic
24a4ba9
Make sure cell is within bounds
aa7cd4a
Loop through columns once
fc6ed3d
Do not close flighting editor on enter/escape
f5b337e
Revert "Do not close flighting editor on enter/escape"
6b705a1
Merge branch 'canary' into am-col-span
amanmahajan7 8f9b78c
Add cellSpan tests
0f74223
Remove colSpan number type
b8e1216
Optimize colSpan check
890ca22
Test navigation
1170703
Fix types
6800dac
Check filter row
d069d11
Fix types
cbc3143
Update src/hooks/useCalculatedColumns.ts
amanmahajan7 7b1941b
Update src/hooks/useViewportColumns.ts
amanmahajan7 0ee74d9
Update src/hooks/useViewportColumns.ts
amanmahajan7 232af07
Update src/types.ts
amanmahajan7 ade49d2
Update src/hooks/useViewportColumns.ts
amanmahajan7 39fb41c
Update src/hooks/useViewportColumns.ts
amanmahajan7 f3f3312
Update src/hooks/useViewportColumns.ts
amanmahajan7 35bcd3e
Quit loop when first startIdx is found
65dbfca
Re-export ColSpanArgs
88a8b7a
Use lastFrozenColumnIndex to validate colSpan
6513d21
Update src/hooks/useViewportColumns.ts
amanmahajan7 832d268
Update src/utils/index.ts
amanmahajan7 6780ecf
Update test/column/colSpan.test.ts
amanmahajan7 4dc2f85
Update test/column/colSpan.test.ts
amanmahajan7 af36ec3
Add getCellsAtRowIndex util
7cf7009
Move nextPosition calculation logic to getNextSelectedCellPosition
b69af47
column.colSpan can't be a number
860a25b
Eslint
ea5e00e
Typecheck
5422f44
Reuse colIdx, add posIdx
2a49cf5
Move posIdx outside
c1922ec
Add failing tests
c5d8421
Fix cell navigation
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Had to split into two hooks as we need to calculate colspan for all the rows in the viewport. This is needed to ensure a column that spans a column in the viewport is also visible