Commit 324c5b5
fix: use record.name instead of record.id for grid row lookups
ObjectGrid applies $select using only column fields, which strips the
`id` property from records returned by ValueDataSource.find(). This
caused handleRowClick, handleEdit, and handleDelete to fail silently
since objects.find(o => o.id === record.id) always returned undefined.
Fixed by matching on `name` (which IS in the grid columns) instead of
`id` in both ObjectManager and FieldDesigner. Also strengthened the
ObjectManagerPage click-to-navigate test to assert the detail view
actually renders after clicking a primary-field-link.
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/2766f2c6-b5ea-42f9-8327-dd8201c1afb7
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>1 parent 1c69eaa commit 324c5b5
File tree
4 files changed
+21
-81
lines changed- apps/console/src/__tests__
- packages/plugin-designer/src
4 files changed
+21
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
568 | 570 | | |
569 | | - | |
| 571 | + | |
570 | 572 | | |
571 | 573 | | |
572 | 574 | | |
573 | 575 | | |
574 | | - | |
| 576 | + | |
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | | - | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | | - | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments