Skip to content

Commit f8f6f9d

Browse files
authored
Merge pull request #882 from objectstack-ai/copilot/fix-row-click-navigation
2 parents 32bb995 + 80e95d6 commit f8f6f9d

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

ROADMAP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,14 @@ The `FlowDesigner` is a canvas-based flow editor that bridges the gap between th
10351035

10361036
**Tests:** Added integration test in `ListViewGroupingPropagation.test.tsx` that verifies toggling a group field via the toolbar immediately updates the rendered schema. All 117 ListView tests pass.
10371037

1038+
### List View Row Click Not Navigating to Record Detail (February 2026)
1039+
1040+
**Root Cause:** `onRowClick` in both `PluginObjectView` (line 772) and `renderListView` (line 599) of `ObjectView.tsx` fell back to `onEdit` / `editHandler`, which only opens an edit form. The `navOverlay.handleClick` from `useNavigationOverlay` — which handles drawer/modal/page navigation modes — was never connected to these click handlers. Additionally, the `useNavigationOverlay` hook was missing the `onNavigate` callback needed for `mode: 'page'` to update the URL.
1041+
1042+
**Fix:** Replaced `onEdit`/`editHandler` fallbacks with `navOverlay.handleClick` in both row click handlers, added `onNavigate` callback to `useNavigationOverlay` that sets the `recordId` URL search parameter, and added `navOverlay` to the `renderListView` useCallback dependency array.
1043+
1044+
**Tests:** All 32 ObjectView tests and 29 useNavigationOverlay tests pass.
1045+
10381046
### ListView Grouping Mode Empty Rows (February 2026)
10391047

10401048
**Root Cause:** When grouping is enabled in list view, `buildGroupTableSchema` in `ObjectGrid.tsx` sets `pagination: false` but inherits `pageSize: 10` from the parent schema. The `DataTableRenderer` filler row logic (`Array.from({ length: Math.max(0, pageSize - paginatedData.length) })`) pads each group table with empty rows up to `pageSize`, creating many blank lines.

apps/console/src/components/ObjectView.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,11 @@ export function ObjectView({ dataSource, objects, onEdit, onRowClick }: any) {
425425
const navOverlay = useNavigationOverlay({
426426
navigation: detailNavigation,
427427
objectName: objectDef.name,
428+
onNavigate: (recordId: string | number, _action?: string) => {
429+
const newParams = new URLSearchParams(searchParams);
430+
newParams.set('recordId', String(recordId));
431+
setSearchParams(newParams);
432+
},
428433
});
429434
const handleDrawerClose = () => {
430435
navOverlay.close();
@@ -596,11 +601,13 @@ export function ObjectView({ dataSource, objects, onEdit, onRowClick }: any) {
596601
schema={fullSchema}
597602
className={className}
598603
onEdit={editHandler}
599-
onRowClick={rowClickHandler || ((record: any) => editHandler?.(record))}
604+
onRowClick={rowClickHandler || ((record: any) => {
605+
navOverlay.handleClick(record);
606+
})}
600607
dataSource={ds}
601608
/>
602609
);
603-
}, [activeView, objectDef, objectName, refreshKey]);
610+
}, [activeView, objectDef, objectName, refreshKey, navOverlay]);
604611

605612
// Memoize the merged views array so PluginObjectView doesn't get a new
606613
// reference on every render (which would trigger unnecessary data refetches).
@@ -769,7 +776,9 @@ export function ObjectView({ dataSource, objects, onEdit, onRowClick }: any) {
769776
activeViewId={activeViewId}
770777
onViewChange={handleViewChange}
771778
onEdit={(record: any) => onEdit?.(record)}
772-
onRowClick={onRowClick || ((record: any) => onEdit?.(record))}
779+
onRowClick={onRowClick || ((record: any) => {
780+
navOverlay.handleClick(record);
781+
})}
773782
renderListView={renderListView}
774783
/>
775784
</div>

0 commit comments

Comments
 (0)