Skip to content

Add support for custom typed values#1

Open
felipedicefm wants to merge 1 commit into
launchscout:mainfrom
felipedicefm:main
Open

Add support for custom typed values#1
felipedicefm wants to merge 1 commit into
launchscout:mainfrom
felipedicefm:main

Conversation

@felipedicefm
Copy link
Copy Markdown

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