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
Hi there, I am working on a project, and I found the need to access the open state of the Combobox outside the Component.
Initially I thought I'll wrap my everything with the parent component, only to realise, that I'll be using another combobox within and nesting would be a bad idea. (is it?)
Anyhow, it came to me, that I can create a renderless component, that gets passed the state, and a handler fn and that way I can update my state higher up in the hierarchy.
My proposal is to add this renderless component to be part of Combobox.
I'm quite happy to implement it and submit a PR.
Obviously this can be used with other render props too.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I am working on a project, and I found the need to access the open state of the Combobox outside the Component.
Initially I thought I'll wrap my everything with the parent component, only to realise, that I'll be using another combobox within and nesting would be a bad idea. (is it?)
Anyhow, it came to me, that I can create a renderless component, that gets passed the state, and a handler fn and that way I can update my state higher up in the hierarchy.
My proposal is to add this renderless component to be part of Combobox.
I'm quite happy to implement it and submit a PR.
Obviously this can be used with other render props too.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions