Created
July 17, 2020 11:04
-
-
Save benvp/8fb6d924ae9fce76db2d03f5ef79e13e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule AutocompleteWeb.ItemSearchLive do | |
use AutocompleteWeb, :live_view | |
alias Autocomplete.Items | |
def mount(_params, _session, socket) do | |
items = Items.list_items() | |
{:ok, assign(socket, suggestions: items, selected: [])} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment