Comments (2)
Yes, the contents of the dropdown can be dynamic and based on the current value and cursor position inside the Input
. You'll basically have to write your own function which returns the items that should appear inside the dropdown.
There's an example of this here: https://github.com/darrenburns/textual-autocomplete/blob/main/examples/custom_meta.py#L95
textual-autocomplete
will pass the value and cursor position into the function for you.
However, a Textual bug meant that the function wasn't always firing when the cursor position changed. I'm not sure whether this has been fixed or not.
from textual-autocomplete.
Do you mean grouped like this? I use this for docker repo selection. (and tag validation)
multi_tier_autocomplete.mov
from textual-autocomplete.
Related Issues (15)
- Drop-down menu doesn't appear HOT 3
- textual-autocomplete breaks textual-0.12+ HOT 2
- [BUG] `AutoComplete` no longer displays inside `Static` widget (v2.1.0b0) HOT 4
- [FEATURE] Display a hint above the input (or in a dynamic way)
- Please add a license HOT 2
- Bug in example: incorrect sorting by match at start of text
- [BUG] Dropdown list is not constrained to screen
- [FEATURE] Adjust layout
- [FEATURE] Click to select items HOT 1
- after 1 dropdown it disable HOT 2
- Multiple autocomplete items event handling HOT 1
- AttributeError: type object 'AutoComplete' has no attribute 'Selected' HOT 1
- Support for textual 0.11.0
- Dropdown displays even if input does not have focus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textual-autocomplete.