-
Notifications
You must be signed in to change notification settings - Fork 2.2k
implement right frozen #3671
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
base: main
Are you sure you want to change the base?
implement right frozen #3671
Conversation
I'm not override frozen to left | right | null, I just add rightFrozen property. It will not break original version.
this is a necessary feature |
@amanmahajan7 any news on this? |
Whats needed to get this across the finish line? willing to put resources on it |
Any update on this feature merging? |
@@ -39,6 +39,8 @@ export interface Column<TRow, TSummaryRow = unknown> { | |||
readonly colSpan?: Maybe<(args: ColSpanArgs<TRow, TSummaryRow>) => Maybe<number>>; | |||
/** Determines whether column is frozen or not */ | |||
readonly frozen?: Maybe<boolean>; | |||
/** Determines whether column is right frozen or not */ | |||
readonly rightFrozen?: Maybe<boolean>; |
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.
I would rather not add a new prop that can cause conflicts. What happens when both rightFrozen
and frozen
props are set? We can instead change frozen
to boolean | 'left' | 'right'
.
@@ -52,13 +52,15 @@ export function useCalculatedColumns<R, SR>({ | |||
const defaultResizable = defaultColumnOptions?.resizable ?? false; | |||
const defaultDraggable = defaultColumnOptions?.draggable ?? false; | |||
|
|||
const { columns, colSpanColumns, lastFrozenColumnIndex, headerRowsCount } = useMemo((): { | |||
const { columns, colSpanColumns, lastFrozenColumnIndex, rightFrozenColumnCount, headerRowsCount } = useMemo((): { |
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.
All the new functionality needs extensive tests
I'm not override frozen to left | right | null, I just add rightFrozen property. It will not break original version.