Tuix.Event.Select (tuix v0.1.2)

Copy Markdown View Source

Delivered when a focused select's selection moves (selects are controlled and the selection follows the highlight, so :up / :down emit this immediately).

The app owns the value: assign it back into state for the selection to appear.

def handle_event(%Tuix.Event.Select{id: :plan, value: value}, app),
  do: {:noreply, assign(app, plan: value)}

Summary

Types

t()

@type t() :: %Tuix.Event.Select{id: term(), value: term()}