|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
from typing import Any, Literal
|
|
|
|
|
|
from reflex.components.component import ComponentNamespace
|
|
|
+from reflex.components.core.debounce import DebounceInput
|
|
|
from reflex.components.el.elements.forms import Form as HTMLForm
|
|
|
from reflex.components.radix.themes.components.text_field import TextFieldRoot
|
|
|
from reflex.event import EventHandler
|
|
@@ -103,9 +104,9 @@ class FormControl(FormComponent):
|
|
|
f"FormControl can only have at most one child, got {len(children)} children"
|
|
|
)
|
|
|
for child in children:
|
|
|
- if not isinstance(child, TextFieldRoot):
|
|
|
+ if not isinstance(child, (TextFieldRoot, DebounceInput)):
|
|
|
raise TypeError(
|
|
|
- "Only Radix TextFieldRoot is allowed as child of FormControl"
|
|
|
+ "Only Radix TextFieldRoot and DebounceInput are allowed as children of FormControl"
|
|
|
)
|
|
|
return super().create(*children, **props)
|
|
|
|