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

How to move children on selecting parent item #51

Open
chandandas opened this issue Nov 30, 2018 · 2 comments
Open

How to move children on selecting parent item #51

chandandas opened this issue Nov 30, 2018 · 2 comments

Comments

@chandandas
Copy link

chandandas commented Nov 30, 2018

Is there a way to move all child items after selecting the parent?

ex. if i select country then all states belong to that automatically move to right hand side?

@jakezatecky
Copy link
Owner

Good question. There is not a way to currently do this.

The parent items are based on <optgroup> elements in the select box and it appears that browsers generally do not allow you select a parent. It may be possible workaround this someway, but the logic could get a bit tricky because you can CTRL or SHIFT click items in a <select> box. I am open to a pull request that could add this in, but for the moment it seems a bit tricky to implement.

@virajdesaiofficial
Copy link

Hi Jake! Thanks for creating this component.

I am also looking for such a functionality. So the only workaround is to select all the child items present? This might become burdensome when there are many child items. Is there any other more elegant solution for this which I can use in the meantime?

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

No branches or pull requests

3 participants