Fix pc.select on change handler (#1080)

This commit is contained in:
Nikhil Rao 2023-05-24 16:36:01 -07:00 committed by GitHub
parent 706abbc756
commit 3d8694cc26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

Binary file not shown.

View File

@ -12,6 +12,7 @@
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"axios": "^1.4.0",
"chakra-react-select": "^4.6.0",
"focus-visible": "^5.2.0",
"framer-motion": "^10.12.4",
"gridjs": "^6.0.6",

View File

@ -295,6 +295,9 @@ class Select(Component):
# default: "outline"
variant: Var[str]
# How the options should be displayed in the menu.
menu_position: Var[str] = "fixed" # type: ignore
def get_controlled_triggers(self) -> Dict[str, Var]:
"""Get the event triggers that pass the component's value to the handler.
@ -302,7 +305,7 @@ class Select(Component):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
"on_change": EVENT_ARG.target.value,
"on_change": EVENT_ARG.value,
}
@classmethod

View File

@ -126,6 +126,7 @@ class FrontendEvent(Base):
target: Target = Target()
key: str = ""
value: Any = None
# The default event argument.