Skip to content

Enable switching field to group records by on existing kanban view#17015

Merged
ijreilly merged 4 commits intomainfrom
fix--reintroduce-update-select-field-kanban-view
Jan 8, 2026
Merged

Enable switching field to group records by on existing kanban view#17015
ijreilly merged 4 commits intomainfrom
fix--reintroduce-update-select-field-kanban-view

Conversation

@ijreilly
Copy link
Copy Markdown
Contributor

@ijreilly ijreilly commented Jan 8, 2026

Fixes #16982 and https://github.com/twentyhq/private-issues/issues/403

Re-introducing the feature to allow to switch field to group records by on a kanban view

Enregistrement.de.l.ecran.2026-01-08.a.13.26.56.mov

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx">

<violation number="1" location="packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx:127">
P2: The `onEnter` callback doesn't respect the disabled state. When `hasOnlyOneGroupByOption` is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the `onEnter` callback to match the disabled behavior.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

<SelectableListItem itemId="GroupBy">
<SelectableListItem
itemId="GroupBy"
onEnter={() => onContentChange('recordGroupFields')}
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The onEnter callback doesn't respect the disabled state. When hasOnlyOneGroupByOption is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the onEnter callback to match the disabled behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx, line 127:

<comment>The `onEnter` callback doesn't respect the disabled state. When `hasOnlyOneGroupByOption` is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the `onEnter` callback to match the disabled behavior.</comment>

<file context>
@@ -116,10 +122,14 @@ export const ObjectOptionsDropdownRecordGroupsContent = () => {
-              <SelectableListItem itemId="GroupBy">
+              <SelectableListItem
+                itemId="GroupBy"
+                onEnter={() => onContentChange('recordGroupFields')}
+              >
                 <MenuItem
</file context>
Suggested change
onEnter={() => onContentChange('recordGroupFields')}
onEnter={() => !hasOnlyOneGroupByOption && onContentChange('recordGroupFields')}

✅ Addressed in f3a720b

handleHideEmptyRecordGroupChange,
} = useRecordGroupVisibility();

const { availableFieldsForKanban } = useGetAvailableFieldsForKanban();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this naming seems outdated?

Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comment + let's fix tests

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:62601

This environment will automatically shut down when the PR is closed or after 5 hours.

@ijreilly ijreilly enabled auto-merge January 8, 2026 13:00
@ijreilly ijreilly added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit f414f47 Jan 8, 2026
68 checks passed
@ijreilly ijreilly deleted the fix--reintroduce-update-select-field-kanban-view branch January 8, 2026 13:18
@twenty-eng-sync
Copy link
Copy Markdown

Hey @ijreilly! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kanban view - cannot select the field with which data is grouped by

2 participants