Skip to content

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