Skip to content
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

Inline create button? #69

Open
holloway opened this issue Nov 20, 2022 · 1 comment
Open

Inline create button? #69

holloway opened this issue Nov 20, 2022 · 1 comment

Comments

@holloway
Copy link

holloway commented Nov 20, 2022

Does this library support inline create buttons, on each tree item?

Ie, I want a + button to allow insertion of tree items at the appropriate place.

While I can add a <button> in my custom Node renderer I'm unable to easily move focus to it via the keyboard, so it seems this isn't something I should do.

@holloway holloway changed the title Inline buttons? Inline create button? Nov 20, 2022
@jameskerr
Copy link
Member

You could change the tabIndex on your inline button when the row receives focus. Could that work?

You could also listen for a particular key to create an item when the row is focused. Right now, this is hard coded as "a" and "Shift+A".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants