make list suggestions work in rx.input (#4391)

* make list suggestions work

* fix pyi
This commit is contained in:
Thomas Brandého 2024-11-18 18:22:01 -08:00 committed by GitHub
parent 22329e592e
commit adaf49e4f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -7,6 +7,7 @@ from reflex.utils import lazy_loader
_MAPPING = {
"forms": [
"button",
"datalist",
"fieldset",
"form",
"input",

View File

@ -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",

View File

@ -681,6 +681,7 @@ class Textarea(BaseHTML):
button = Button.create
datalist = Datalist.create
fieldset = Fieldset.create
form = Form.create
input = Input.create

View File

@ -1490,6 +1490,7 @@ class Textarea(BaseHTML):
...
button = Button.create
datalist = Datalist.create
fieldset = Fieldset.create
form = Form.create
input = Input.create

View File

@ -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]

View File

@ -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.