Skip to content

Add support for custom typed values #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

felipedicefm
Copy link

Hi 👋🏼

Thanks for the library. Here is something I missed while using this library so I'm using my fork for now. Let me know if that make sense to be part of this library instead.

This commit add an option to allow values outside the options to be commited. In my use case, I just want to show options as suggestions so the user should be able to use whatever he typed as the value if he wants to.

Also, send the this.label so that we it makes it easier to pattern match the event in LiveView insteaf of using the input[name]. For instance:

def handle_event("autocomplete-commit", %{"label" => "my-label", "value" => value}, socket) do
  ...
end

This commit add an option to allow values outside the options to be
commited. In my use case, I just want to show options as suggestions so
the user should be able to use whatever he typed as the value if he
wants to.

Also, send the `this.label` so that we it makes it easier to pattern
match the event in LiveView insteaf of using the `input[name]`. For
instance:

```Elixir
def handle_event("autocomplete-commit", %{"label" => "my-label", "value" => value}, socket) do
  ...
end
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant