-
Notifications
You must be signed in to change notification settings - Fork 47
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
resetting list of options when text input field becomes empty #74
Comments
Thanks, I understand the use case here. However, the One idea would be to send the |
I actually don’t know how to make it work. How can I reset the list of
options when the field is cleared? It doesnt send a live select event with
a blank text field
…On Sat, Jun 22, 2024 at 14:23 Max ***@***.***> wrote:
Thanks, I understand the use case here. However, the options_clear event
is internal to LiveSelect, and you would not be able to handle it in your
live view/component. However, your description sounds like you are able to
handle it. Can you please clarify how?
One idea would be to send the options_clear event also to the live
view/component that renders LiveSelect, with the id as you suggest
—
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKA2RZOT7MXCQRQ6N7TF73ZIW6LPAVCNFSM6AAAAABJXP6RB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUGE2DAMJRGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Does this cheatsheet work for you? |
It should work, I created it exactly to implement this use case |
When options are cleared I want to show the initial full selection list. However currently the
live_select_id
is not sent with theoptions_clear
event so I cannot reset the live select form. My workaround is to store the lastlive_select_id
and then clear that with theoptions_clear
event but I'm not sure this will work if I have multiple live selects on the same page.The text was updated successfully, but these errors were encountered: