Comments (3)
Can you try accessing the TreeStateContext from within UNSTABLE_TreeItemContent/the checkbox instead? I imagine you should be able to override the onChange
for the Checkbox at that point to reach your desired behavior then. However, if you want interactions on the Tree row itself to also follow the same behavior, that might be a bit trickier, might have to drop down to the hooks level to fully customize that behavior
from react-spectrum.
It looks like I'm able to access the state via context from within my Checkbox component. Thanks!
Do you know if there is appetite to include this parent selection behavior out of the box? It feels pretty standard for a tree component and might be easier implemented internally.
from react-spectrum.
Yeah, I think supporting that kind of parent selection behavior makes sense, there is work slated for having the parent be in a "indeterminate" state if a subset of its children are selected already so something like that seems like a natural progression. Would probably become an option on the Tree itself. Would you like to modify this issue to reflect this parent selection instead? Would be good to have this publicly tracked as well
from react-spectrum.
Related Issues (20)
- Display DatePicker calendar popover when the date segments gain focus
- Select / ComboBox Open State isn't Persisted into Button's isPressed Render Prop HOT 2
- GridList renderEmptyState cannot be a Component with Hooks HOT 2
- (0 , $lislG$swchelperscjs_class_private_field_initcjs._) is not a function HOT 1
- [RAC] NumberField really strange behavior HOT 3
- Tooltip causing ResizeObserver issue HOT 4
- Select with additional buttons traps focus
- Cannot setup dev environment HOT 6
- Multiple auto-dismiss toasts HOT 1
- Exception when dragging items in RAC ListBox with sections HOT 2
- Rules of hooks error in `useLinkProps` HOT 2
- Custom FieldError message overrides the error messages coming from Form's validationErrors HOT 6
- `scroll-padding` not respected when `ListBox` is rendered in a `Popover` HOT 4
- Cyclic Dependancy Warning HOT 2
- [RAC] Virtualized GridList jumping around when tab in
- useLongPress onLongPressEnd fires while still pressed HOT 4
- Context set in collection item node not propagating HOT 4
- Windows 11 Narrator intercept default actions HOT 1
- Getting warning to use aria-label when running tests when test markup is correct. HOT 1
- The useOverlayPosition hook accepts a placement prop bottom, but return the placement is top
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-spectrum.