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

List: Initializing the list Model to be used in filtering mode directly #344

Open
lorenzo-milicia opened this issue Mar 5, 2023 · 2 comments

Comments

@lorenzo-milicia
Copy link

lorenzo-milicia commented Mar 5, 2023

Hi everyone, this is my first ever Issue raised, hopefully I'm not breaking any guidelines.
I am using Bubbles and Bubbletea to write a small utility CLI tool, after experimenting a bit with gum. But I can't seem to figure out if there is a way to use the list component directly as a filtering tool.
My use case would be to simply initialize the list component to already be (and potentially ONLY be) set up for filtering.
I tried looking at the code, and I don't see any public method to manipulate the FilterState outside of the KeyMsg. I tried implementing it myself on a fork, and it seems to be straight forward, all I did was expose a public method to set the FilterState of the model.
Adding on that, although this might be just a matter of personal like, I find it a bit annoying to not be able to move the list cursor up and down while being in the Filtering mode. I can't think of any actual use of the up and down arrow keys in filtering mode, so I want to ask if there's a specific reason why the up and down keys are mapped to CancelWhileFiltering.
If these improvements could be something worth implementing, I would be more than glad to give it a try myself and open a Pull Request.

@decentral1se
Copy link

I tried implementing it myself on a fork, and it seems to be straight forward, all I did was expose a public method to set the FilterState of the model.

Yeh I'd be interested in that API! Tried to do this myself also. Thanks!

@decentral1se
Copy link

PR already cut over in #335 it seems!

youyoumu pushed a commit to youyoumu/bubbles that referenced this issue Jan 19, 2025
* docs: clean up readme

* chore: add references

* chore: set to 80 char width

* docs: remove 404 docs link for now + tidy up READMEs

* docs: small language change in README

Co-authored-by: Christian Rocha <[email protected]>
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