Commit a149e90
`ObjectGrid` carries two selection sources that must move together:
`selectedRows` (ours — drives the toolbar) and the data-table's internal
`selectedRowIds` (drives the checkboxes, cleared only when the host bumps
`selectionResetKey`). `handleBulkDialogClose` reset both; `dispatchBulkAction`
reset only the first, on BOTH of its branches — the bulk-delete route through
`onBulkDelete` and the by-name runner dispatch.
So a successful run left the toolbar gone and every row still ticked, with no
affordance to act on them. The invariant was already written down in
`handleBulkDialogClose`'s comment ("ticked rows with no toolbar"); it just was
not upheld on the other path.
All three call sites now go through one `resetSelection()` helper, so the rule
is structural instead of three places remembering to agree. Failure semantics
are unchanged: an action reporting `success: false` keeps both sources so the
user can retry the same rows.
Reverse-control: with only ObjectGrid.tsx reverted, the two new positive
assertions fail (checkboxes stay 'checked' after a successful by-name action
and after a bulk delete).
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 9369d4b commit a149e90
3 files changed
Lines changed: 126 additions & 15 deletions
File tree
- .changeset
- packages/plugin-grid/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1711 | 1711 | | |
1712 | 1712 | | |
1713 | 1713 | | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1714 | 1726 | | |
1715 | 1727 | | |
1716 | 1728 | | |
1717 | 1729 | | |
1718 | 1730 | | |
1719 | | - | |
1720 | | - | |
| 1731 | + | |
1721 | 1732 | | |
1722 | 1733 | | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1728 | 1740 | | |
1729 | 1741 | | |
1730 | | - | |
1731 | | - | |
| 1742 | + | |
1732 | 1743 | | |
1733 | 1744 | | |
1734 | 1745 | | |
| |||
1791 | 1802 | | |
1792 | 1803 | | |
1793 | 1804 | | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
| 1805 | + | |
1797 | 1806 | | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
| 1807 | + | |
1801 | 1808 | | |
1802 | 1809 | | |
1803 | 1810 | | |
| |||
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
0 commit comments