File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ The `Select` widget has a `type_to_search` attribute which allows you to type to
98
98
99
99
## Reactive Attributes
100
100
101
-
102
101
| Name | Type | Default | Description |
103
102
| ------------| --------------------------------| ------------------------------------------------| -------------------------------------|
104
103
| ` expanded ` | ` bool ` | ` False ` | True to expand the options overlay. |
Original file line number Diff line number Diff line change @@ -63,13 +63,21 @@ class UpdateSelection(Message):
63
63
def __init__ (self , type_to_search : bool = True ) -> None :
64
64
super ().__init__ ()
65
65
self ._type_to_search = type_to_search
66
+ """If True (default), the user can type to search for a matching option and the cursor will jump to it."""
67
+
66
68
self ._search_query : str = ""
69
+ """The current search query used to find a matching option and jump to it."""
70
+
71
+ self ._search_reset_delay : float = 0.7
72
+ """The number of seconds to wait after the most recent key press before resetting the search query."""
67
73
68
74
def on_mount (self ) -> None :
69
75
def reset_query () -> None :
70
76
self ._search_query = ""
71
77
72
- self ._search_reset_timer = Timer (self , 0.7 , callback = reset_query )
78
+ self ._search_reset_timer = Timer (
79
+ self , self ._search_reset_delay , callback = reset_query
80
+ )
73
81
74
82
def watch_has_focus (self , value : bool ) -> None :
75
83
self ._search_query = ""
You can’t perform that action at this time.
0 commit comments