-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input in allotment pane does not auto focus using el.focus in a useEffect #402
Comments
For now I've discovered that I can work around the issue in our cases by doing: // big value makes all panes equal size
<Allotment defaultSizes={new Array(panes.length).fill(100000)}>
...
</Allotment> Edit: |
Thanks for the report and reproduction. I agree it's not desirable behaviour. I'll get it fixed! I'll revisit the use of Edit: I read your comment the wrong way round. More |
I threw together a PR just now: #404. I need to think through the consequences but I think losing I've also changed adding, updating and removing panes happen in a |
Will give it a go! |
Heya John, just wondering when this change will be released through npm? Thanks! |
Hey John!
I ran into an issue auto-focusing an input in one of our components that is rendered in allotment.
I narrowed down the issue to the split view view being
display: none
at the time the component renders. This causesel.focus
to noop.I produced a reproduction, which you can find at https://github.com/adri1wald/allotment-focus-issue-repro. Interestingly the issue does not occur when you mount
<Allotment />
withdefaultSizes
Best,
Adrien
The text was updated successfully, but these errors were encountered: