FloUI.Dropdown (FloUI v0.1.0-alpha.5) View Source

Usage in SnapFramework

Dropdown component that scrolls. You can pass two separate themes as options. one for the dropdown, and one for the scroll bar.

Options

theme: theme,
scroll_bar: %{
  show: true,
  show_buttons: true,
  theme: Scenic.Primitive.Style.Theme.preset(:dark),
  thickness: 15
}

data is a tuple in the form of

{
  [
    {{"option 1", :option_1}, :option_1},
    {{"option 2", :option_2}, :option_2},
    {{"option 3", :option_3}, :option_3}
  ],
  :option_1
}

Events emitted

{:value_changed, id, value}

<%= component FloUI.Dropdown,
    {@items, @selected},
    id: :dropdown,
    theme: @theme,
    scroll_bar: %{
      show: true,
      show_buttons: true,
      theme: Scenic.Primitive.Style.Theme.preset(:dark),
      thickness: 15
    }
%>

Link to this section Summary

Link to this section Functions

Link to this function

add_to_graph(graph, data, opts \\ [])

View Source

Callback implementation for Scenic.Component.add_to_graph/3.

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle_event(event, from_pid, scene)

View Source

Callback implementation for Scenic.Scene.handle_event/3.

Link to this function

handle_input(input, id, scene)

View Source

Callback implementation for Scenic.Scene.handle_input/3.

Link to this function

handle_update(msg, opts, scene)

View Source

Callback implementation for Scenic.Scene.handle_update/3.

Link to this function

init(scene, data, opts \\ [])

View Source

Callback implementation for Scenic.Scene.init/3.

Callback implementation for SnapFramework.Scene.mounted/1.

Link to this function

process_call(msg, from, scene)

View Source

Callback implementation for SnapFramework.Scene.process_call/3.

Link to this function

process_cast(msg, scene)

View Source

Callback implementation for SnapFramework.Scene.process_cast/2.

Link to this function

process_info(msg, scene)

View Source

Callback implementation for SnapFramework.Scene.process_info/2.

Link to this function

process_update(data, opts, scene)

View Source

Callback implementation for SnapFramework.Scene.process_update/3.

Callback implementation for Scenic.Component.validate/1.