You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix single-select toggle-off and form payload disambiguation
- Fix treeViewNodeChecked/Before events reporting wrong checkedValue on toggle-off (was hardcoded 'true', now reflects actual new state)
- Align keyboard Space/Enter with click: pressing Space on an already-selected single-select node now deselects it
- Include data-node-id as nodeId in hidden form input payload so duplicate-path nodes are distinguishable on the server side
Copy file name to clipboardExpand all lines: .changeset/all-paths-dance.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,3 +3,7 @@
3
3
---
4
4
5
5
Fix selection of nodes with the same path in Primer::Alpha::TreeView
6
+
7
+
When a `[role=treeitem]` element carries a `data-node-id` attribute, that id is now included as `nodeId` in the hidden form input payload (`{path, nodeId?, value?}`). Trees with duplicate-path nodes should set `data-node-id` to a stable unique identifier so the server can distinguish which node was selected.
8
+
9
+
**Breaking change in `TreeViewElement#checkOnlyAtPath`:** if the given path is not found the method is now a no-op. Previously it would uncheck all active nodes before failing to check the missing node, which could be used as an indirect "clear selection" mechanism. Use explicit `setNodeCheckedValue(node, 'false')` calls if that behaviour is needed.
0 commit comments