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

[Feature] Choose order of all options #13

Closed
NovaliX-Dev opened this issue Jul 10, 2022 · 3 comments
Closed

[Feature] Choose order of all options #13

NovaliX-Dev opened this issue Jul 10, 2022 · 3 comments

Comments

@NovaliX-Dev
Copy link
Contributor

NovaliX-Dev commented Jul 10, 2022

#Why ?
Certains programs need to let the user choose the order of certain things. For example, a tool allow to combine data all together and the user can choose in which order to combine it.

#How will it work ?
Similarly to Multi-Select : the space key is used to select an option, the arrows to navigate threw or move the selected option and the enter key to finalize the order.

For the returned value, it can be a Vector containing the ordered IDs of the options. The IDs will be just the index of them in the list given to the question constructor.

I don't think the separators sill be necessary, because the user will mix the options up.

@Lutetium-Vanadium
Copy link
Owner

This is a very good feature to add. For the returned value (similar to multi-select) it should return a Vec<ListItem>, rather than just Vec<usize>.

Would you like to create a PR to add it? Otherwise, I'm happy to implement it too.

@NovaliX-Dev
Copy link
Contributor Author

I'm not able to do it right now, but sure at the end of the vacation i can try to implement it.

@NovaliX-Dev
Copy link
Contributor Author

I had made a PR to implement it (this pr), so i think we can close this issue.

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