Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove require_selection from autocomplete #947

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions mesop/components/autocomplete/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ class AutocompleteOptionGroup:
class AutocompleteEnterEvent(MesopEvent):
"""Represents an "Enter" keyboard event on an autocomplete component.

This will return the raw value if `require_selection` is False.

If `require_selection` is True, then only a valid selection will be returned. An empty
string will be return if not valid selection has been made.

Attributes:
value: Input/selected value.
key (str): key of the component that emitted this event.
Expand Down Expand Up @@ -99,7 +94,6 @@ def autocomplete(
appearance: Literal["fill", "outline"] = "fill",
disabled: bool = False,
placeholder: str = "",
require_selection: bool = False,
value: str = "",
readonly: bool = False,
hide_required_marker: bool = False,
Expand Down
1 change: 0 additions & 1 deletion mesop/components/autocomplete/e2e/autocomplete_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def app():
me.autocomplete(
label="Select state",
options=_make_autocomplete_options(),
require_selection=True,
on_selection_change=on_value_change,
on_enter=on_value_change,
on_input=on_input,
Expand Down
Loading