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

Filter options inside a select field based in the previous steps data #149

Closed
lucasfloriani opened this issue Feb 18, 2024 · 1 comment
Closed

Comments

@lucasfloriani
Copy link

Is your feature request related to a problem? Please describe.
I'm implementing a project where it's a CLI that will create shortcuts with the keyboard that will run complex tasks. There's one flow where we can select the events we want and which keys will trigger them in the same form process. We currently have 5 options available where you can select the key to press, but we want to make it more user-friendly and filter the keys that the customer has already selected to execute something.

Describe the solution you'd like
As we are familiar with the WithHideFunc at the group level, I believe it would be nice to have something like that at the Option level.

Describe alternatives you've considered
I was thinking of using WithHideFunc at the group level to create a brute force of all possibilities, but it will create a lot of boilerplate for a simple functionality

PS: If we have another way to implement such a feature with the actual API please let me know 🙇‍♂️

Also, thanks for all those amazing libraries for CLI. It made me go back to Golang to have some fun 😄

@maaslalani
Copy link
Member

Hey @lucasfloriani, this is a great idea. Thanks for opening up this issue. I'm going to merge this issue with a similar one to consolidate the ideas:

The system we want to create is a way to dynamically change all fields by reacting to previous answers (or perhaps even other events, timeouts? external APIs? etc...) which will allow for very feature-rich and functional forms.

Feel free to re-open this issue or make a new one if you don't think your use case will be solved.

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