Open janbaykara opened 6 years ago
@janbaykara That would be easy to add. Do you think driving it by index (0..n
) and undefined
(all close) should be enough? Also, should children then receive the toggle
function? I suppose no ...
@drcmda Driving it by index could work, sure, especially given that we're just providing arrays and key accessors ourselves. toggle
in controlled mode wouldn't have an effect on the openIndex
in any case, I suppose.
Could supply a console warning when calling toggle
and openIndex
is not undefined, but we'd need to reconcile situations where toggle
is called when openIndex
is undefined
, and then the openIndex
prop is set to a value - which you'd expect to override the internal state.
@drcmda Hey, what is the status of this? I am trying to synchronise the open state with a router and navigate to the grid with the cell expanded with key parsed from the url. Is it possible to trigger specific cell to be opened without click event? Thanks
Could i interest you in making a PR? I'd guide you through the react-spring update as well.
Is there a way to set the 'open' element by key as a prop, so Grid can be used as a controlled, stateless component? You could use this to, say, synchronise the open state with a router system.