diff --git a/pynecone/.templates/web/bun.lockb b/pynecone/.templates/web/bun.lockb index ef93683d9..c5a22c3e0 100755 Binary files a/pynecone/.templates/web/bun.lockb and b/pynecone/.templates/web/bun.lockb differ diff --git a/pynecone/.templates/web/package.json b/pynecone/.templates/web/package.json index 2d5664478..d5fd67b38 100644 --- a/pynecone/.templates/web/package.json +++ b/pynecone/.templates/web/package.json @@ -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", diff --git a/pynecone/components/forms/select.py b/pynecone/components/forms/select.py index 18acac7ce..42aef7d87 100644 --- a/pynecone/components/forms/select.py +++ b/pynecone/components/forms/select.py @@ -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 diff --git a/pynecone/event.py b/pynecone/event.py index 910f7f5ea..a86c9748b 100644 --- a/pynecone/event.py +++ b/pynecone/event.py @@ -126,6 +126,7 @@ class FrontendEvent(Base): target: Target = Target() key: str = "" + value: Any = None # The default event argument.