react-focus-lock
react-focus-lock copied to clipboard
FocusLock children prop
Does children prop of FocusLock required to be a single node or even a single dom node?
Does the as prop expected to forward a ref to a dom node?
I want to use the FocusLock like that:
const MyComponent = React.forwardRef((props, ref) => {
return <div ref={ref} {...props} />
});
...
<FocusLock as={MyComponent} className={'class-name'} lockPorps={{...}} />
...
Does the as prop expected to forward a ref to a dom node?
To some dom node around content, yes. No matter which one.
Does children prop of FocusLock required...
It's required to be "anything renderable as children", which is usually just node.
i cant find the case where you need children. that propType should not be required, because of the use case i described above.
From #87
- [ ] move Sidecar out of Container
- [ ] remove restrictions from PropTypes
- [ ] for TS - infer the right children type
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.