Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3967 +/- ##
==========================================
- Coverage 97.53% 97.53% -0.01%
==========================================
Files 36 36
Lines 1463 1462 -1
Branches 472 472
==========================================
- Hits 1427 1426 -1
Misses 36 36
🚀 New features to boost your workflow:
|
nstepien
commented
Feb 23, 2026
| function groupRows( | ||
| rows: readonly R[], | ||
| [groupByKey, ...remainingGroupByKeys]: readonly string[], | ||
| groupByIndex: number, |
Collaborator
Author
There was a problem hiding this comment.
Refactored this so we don't create temp arrays
| fn: Maybe<(...args: Args) => void> | ||
| ): Maybe<(...args: Args) => void>; | ||
|
|
||
| export function useLatestFunc<Args extends unknown[]>(fn: Maybe<(...args: Args) => void>) { |
Collaborator
Author
There was a problem hiding this comment.
We can implement this without any/@ts-expect-error!
| Object.setPrototypeOf(cellEvent, Object.getPrototypeOf(event)); | ||
|
|
||
| return cellEvent; | ||
| }); |
Collaborator
Author
There was a problem hiding this comment.
This creates a new object that inherits from the event object, and adds preventGridDefault/isGridDefaultPrevented property descriptors
WDYT?
| */ | ||
| const handleColumnResizeLatest = useLatestFunc(handleColumnResize); | ||
| const handleColumnResizeEndLatest = useLatestFunc(handleColumnResizeEnd); | ||
| const onColumnsReorderLastest = useLatestFunc(onColumnsReorder); |
| const columnWidth = getColumnWidth(column); | ||
| const colSpan = column.colSpan?.({ type: 'ROW', row: rows[rowIdx] }) ?? 1; | ||
| const { insetInlineStart, ...style } = getCellStyle(column, colSpan); | ||
| const style = getCellStyle(column, colSpan); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I've renamed a few components/type for clarity and consistency.
It's like naming components
*Component.renderers.renderCellandcolumn.renderCell,I've changed some names from
*CellPropsto*CellContentPropsfor exampledefaultexports so we use the same named import everywhereBreaking changes:
RenderCellProps->RenderCellContentPropsRenderHeaderCellProps->RenderHeaderCellContentPropsRenderSummaryCellProps->RenderSummaryCellContentPropsRenderGroupCellProps->RenderGroupCellContentPropsRenderEditCellProps->RenderEditCellContentPropsCellRendererProps->RenderCellPropsRender*Propspattern), it'll conflict with the olderRenderCellPropstype name, need to be careful when updating RDGSelectCellFormatter->SelectCheckbox