textual icon indicating copy to clipboard operation
textual copied to clipboard

Search Functionality for the Select Widget

Open davemagro opened this issue 1 year ago • 6 comments

I think this would be a very useful feature. Kind of needed in my current project as well.

Leaving an issue to hopefully get back to this in the future. Hope I could find the time to implement this myself.

davemagro avatar Feb 16 '24 07:02 davemagro

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

github-actions[bot] avatar Feb 16 '24 07:02 github-actions[bot]

I would also like to start working on this feature. First of all, I believe it should be decided how would the search future work in detail. Will you be able to search for an item by completely typing it or it will just jump to the first item with the letter on the list?

fer-hnndz avatar Feb 19 '24 21:02 fer-hnndz

I agree some sort of "autocomplete" widget would be extremely useful and something I've seen often requested. For example my own issue here:

  • https://github.com/Textualize/textual/issues/3362

If someone does want to take this on, I think the core functionality for such a widget has already been worked out in the command palette if that helps!

TomJGooding avatar Feb 20 '24 23:02 TomJGooding

I'll look intro the command palette code. I just realized it had that autocomplete function. Not sure if it should be added as a whole new widget or as a feature for select widgets.

fer-hnndz avatar Feb 22 '24 04:02 fer-hnndz

I think this should be a new widget. A simple dropdown list is very different from a text input enhanced by suggested options. Not to mention the code for the Select widget is already complicated enough as it is!

But if you're serious about working on this, I'd wait for some input from a Textual maintainer.

TomJGooding avatar Mar 01 '24 20:03 TomJGooding