Replies: 1 comment 5 replies
-
Could you just control the state from outside? I'm imagining you have something like this:
(since you can't put a button inside the GridList) in which case you can just control it with state and props like a controlled component
Otherwise, selection is available through ListStateContext -> selectionManager.clearSelection() |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to add a clear button, like I've done for the DateRangePicker:
But I don't know which context to use. Looking into the Grid List component, I see I can't hoist the context up and use it in a general way.
Because the
GridListInner
has all the contexts. I tried using a wrappingListStateContext
but then I have to provide the collection, disabledKeys and selectionManager.I've tried
ListStateContext
as well but with no luck 😞I feel like I'm missing something here.
Beta Was this translation helpful? Give feedback.
All reactions