@@ -31,13 +31,37 @@ def create_default_input_selection_style() -> BaseStyle:
3131
3232
3333class InputSelection (Generic [_T ]):
34+ """
35+ Input selection prompt. Ask the user to choose among a set of options.
36+
37+ Example usage::
38+
39+ input_selection = InputSelection(
40+ message="Please select a dish:",
41+ options=[
42+ ("pizza", "Pizza with mushrooms"),
43+ ("salad", "Salad with tomatoes"),
44+ ("sushi", "Sushi"),
45+ ],
46+ default="pizza",
47+ )
48+ result = input_selection.prompt()
49+
50+ :param message: Plain text or formatted text to be shown before the options.
51+ :param options: Sequence of `(value, label)` tuples.
52+ :param default: Default value. If none is given, the first option is
53+ considered the default.
54+ :param mouse_support: Enable mouse support.
55+ :param style: :class:`.Style` instance for the color scheme.
56+ """
57+
3458 def __init__ (
3559 self ,
3660 * ,
3761 message : AnyFormattedText ,
3862 options : Sequence [tuple [_T , AnyFormattedText ]],
3963 default : _T | None = None ,
40- mouse_support : bool = True ,
64+ mouse_support : bool = False ,
4165 style : BaseStyle | None = None ,
4266 symbol : str = ">" ,
4367 show_frame : FilterOrBool = False ,
@@ -156,14 +180,37 @@ def select_input(
156180 message : AnyFormattedText ,
157181 options : Sequence [tuple [_T , AnyFormattedText ]],
158182 default : _T | None = None ,
159- mouse_support : bool = True ,
183+ mouse_support : bool = False ,
160184 style : BaseStyle | None = None ,
161185 symbol : str = ">" ,
162186 show_frame : bool = False ,
163187 enable_suspend : FilterOrBool = False ,
164188 enable_abort : FilterOrBool = True ,
165189 interrupt_exception : type [BaseException ] = KeyboardInterrupt ,
166190) -> _T :
191+ """
192+ Input selection prompt. Ask the user to choose among a set of options.
193+
194+ Example usage::
195+
196+ result= select_input(
197+ message="Please select a dish:",
198+ options=[
199+ ("pizza", "Pizza with mushrooms"),
200+ ("salad", "Salad with tomatoes"),
201+ ("sushi", "Sushi"),
202+ ],
203+ default="pizza",
204+ )
205+
206+ :param message: Plain text or formatted text to be shown before the options.
207+ :param options: Sequence of `(value, label)` tuples.
208+ :param default: Default value. If none is given, the first option is
209+ considered the default.
210+ :param mouse_support: Enable mouse support.
211+ :param style: :class:`.Style` instance for the color scheme.
212+ """
213+
167214 return InputSelection [_T ](
168215 message = message ,
169216 options = options ,
0 commit comments