-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix crash when hiding a column in Kanban view #11847
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
Fix crash when hiding a column in Kanban view #11847
Conversation
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.
PR Summary
Fixed a crash in the Kanban view when hiding columns by properly wrapping the 'HiddenGroups' SelectableListItem with a SelectableList component to provide necessary context for Recoil state management.
- Modified
packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx
to wrap HiddenGroups SelectableListItem with SelectableList - Added missing selectableListInstanceId context required for recoil state management
- Fixed issue Kanban - Page crashes after hiding a column in Kanban view #11828 where hiding Kanban columns would trigger "Instance id is not provided" error
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
selectableListInstanceId={OBJECT_OPTIONS_DROPDOWN_ID} | ||
hotkeyScope={TableOptionsHotkeyScope.Dropdown} | ||
selectableItemIdArray={['HiddenGroups']} |
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.
logic: Using same selectableListInstanceId (OBJECT_OPTIONS_DROPDOWN_ID) as parent SelectableList could cause conflicts in state management
selectableListInstanceId={OBJECT_OPTIONS_DROPDOWN_ID} | |
hotkeyScope={TableOptionsHotkeyScope.Dropdown} | |
selectableItemIdArray={['HiddenGroups']} | |
selectableListInstanceId={`${OBJECT_OPTIONS_DROPDOWN_ID}-hidden`} | |
hotkeyScope={TableOptionsHotkeyScope.Dropdown} | |
selectableItemIdArray={['HiddenGroups']} |
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.
Very good job !
Thanks @abdulrahmancodes for your contribution! |
Problem
When hiding a kanban view column, users encountered the following error:
Instance id is not provided and cannot be found in context.
This was caused by the
SelectableListItem
for the "HiddenGroups" menu item not being wrapped in aSelectableList
. As a result, the required context (specifically, the selectableListInstanceId) was missing, leading to errors in recoil state management.Solution
This PR wraps the "HiddenGroups"
SelectableListItem
in its ownSelectableList
component, providing the necessary context and ensuring that the component family selectors work as expected.Screen.Recording.2025-05-03.at.8.30.24.AM.mov
Closes #11828