-
Notifications
You must be signed in to change notification settings - Fork 281
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
Activate filtering programmatically #85
Comments
Hi! SetFilteringEnabled is actually for enabling and disabling filter functionality, not quite for triggering filtering. Based on my quick skimming of the code think we’ll need to add a method for you to be able to activate the filter programmatically. Anyway, it’s a good idea, and we should definitely add it (surprised we haven’t, actually), though it will probably happen after the new year. |
@meowgorithm Any update around this? |
I am facing the same issue. I just want to view filter input with a different key msg and use it for another purpose rather than filtering. But no way to achieve this. m.list.SetShowFilter() doesn't work and does not replace title. Any news on this issue? |
Same thoughts as @akgunberk: I would ideally just want to co-opt the same screen space the filtering currently takes up, but activate it with a different key and then just capture the input without any filtering. |
I did some detective work: #335 indeed fixes this. However the PR was merged after v.20.0 was tagged and is therefore not available for bubbletea v1. |
Problem
I'm looking to enable filtering for my
github.com/charmbracelet/bubbles/list
component by default so that as soon as the list is rendered I can start to type, without needing to press the filter shortcut (/
) first.Recreate
list-default
example within the charmbracelet/bubbletea repom.list.SetFilteringEnabled(true)
on line 82I'm relatively new to the package so I think this needs to be done at a different point within the model lifecycle, rather than at the point of creation. Any help would be great 👍
The text was updated successfully, but these errors were encountered: