charmbracelet / charmbracelet/bubbles

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

Open
#344 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.