make list suggestions work in rx.input (#4391)
* make list suggestions work * fix pyi
This commit is contained in:
parent
22329e592e
commit
adaf49e4f9
@ -5,6 +5,7 @@
|
||||
|
||||
from . import elements as elements
|
||||
from .elements.forms import Button as Button
|
||||
from .elements.forms import Datalist as Datalist
|
||||
from .elements.forms import Fieldset as Fieldset
|
||||
from .elements.forms import Form as Form
|
||||
from .elements.forms import Input as Input
|
||||
@ -18,6 +19,7 @@ from .elements.forms import Progress as Progress
|
||||
from .elements.forms import Select as Select
|
||||
from .elements.forms import Textarea as Textarea
|
||||
from .elements.forms import button as button
|
||||
from .elements.forms import datalist as datalist
|
||||
from .elements.forms import fieldset as fieldset
|
||||
from .elements.forms import form as form
|
||||
from .elements.forms import input as input
|
||||
|
@ -7,6 +7,7 @@ from reflex.utils import lazy_loader
|
||||
_MAPPING = {
|
||||
"forms": [
|
||||
"button",
|
||||
"datalist",
|
||||
"fieldset",
|
||||
"form",
|
||||
"input",
|
||||
|
@ -4,6 +4,7 @@
|
||||
# ------------------------------------------------------
|
||||
|
||||
from .forms import Button as Button
|
||||
from .forms import Datalist as Datalist
|
||||
from .forms import Fieldset as Fieldset
|
||||
from .forms import Form as Form
|
||||
from .forms import Input as Input
|
||||
@ -17,6 +18,7 @@ from .forms import Progress as Progress
|
||||
from .forms import Select as Select
|
||||
from .forms import Textarea as Textarea
|
||||
from .forms import button as button
|
||||
from .forms import datalist as datalist
|
||||
from .forms import fieldset as fieldset
|
||||
from .forms import form as form
|
||||
from .forms import input as input
|
||||
@ -226,6 +228,7 @@ from .typography import ul as ul
|
||||
_MAPPING = {
|
||||
"forms": [
|
||||
"button",
|
||||
"datalist",
|
||||
"fieldset",
|
||||
"form",
|
||||
"input",
|
||||
|
@ -681,6 +681,7 @@ class Textarea(BaseHTML):
|
||||
|
||||
|
||||
button = Button.create
|
||||
datalist = Datalist.create
|
||||
fieldset = Fieldset.create
|
||||
form = Form.create
|
||||
input = Input.create
|
||||
|
@ -1490,6 +1490,7 @@ class Textarea(BaseHTML):
|
||||
...
|
||||
|
||||
button = Button.create
|
||||
datalist = Datalist.create
|
||||
fieldset = Fieldset.create
|
||||
form = Form.create
|
||||
input = Input.create
|
||||
|
@ -67,6 +67,9 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
|
||||
# Value of the input
|
||||
value: Var[Union[str, int, float]]
|
||||
|
||||
# References a datalist for suggested options
|
||||
list: Var[Union[str, int, bool]]
|
||||
|
||||
# Fired when the value of the textarea changes.
|
||||
on_change: EventHandler[input_event]
|
||||
|
||||
|
@ -119,6 +119,7 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
|
||||
required: Optional[Union[Var[bool], bool]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
@ -206,6 +207,7 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
|
||||
required: Indicates that the input is required
|
||||
type: Specifies the type of input
|
||||
value: Value of the input
|
||||
list: References a datalist for suggested options
|
||||
on_change: Fired when the value of the textarea changes.
|
||||
on_focus: Fired when the textarea is focused.
|
||||
on_blur: Fired when the textarea is blurred.
|
||||
@ -454,6 +456,7 @@ class TextField(ComponentNamespace):
|
||||
required: Optional[Union[Var[bool], bool]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
@ -541,6 +544,7 @@ class TextField(ComponentNamespace):
|
||||
required: Indicates that the input is required
|
||||
type: Specifies the type of input
|
||||
value: Value of the input
|
||||
list: References a datalist for suggested options
|
||||
on_change: Fired when the value of the textarea changes.
|
||||
on_focus: Fired when the textarea is focused.
|
||||
on_blur: Fired when the textarea is blurred.
|
||||
|
Loading…
Reference in New Issue
Block a user