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

Usage in SnapFramework

Dropdown component which renders a scroll bar when when the list becomes greater then the height of the dropdown.

data is a tuple in the form of elixir {items, selected}

item is a tuple in the form of

{%{
  label: "label",
  value: value
}, :id}

style opts width: :integer height: :integer

<%= component FloUI.Dropdown,
    {@dropdown_opts, @selected_opt},
    id: @opts[:id]
%>

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for Scenic.Scene.init/3.

Callback implementation for Scenic.Component.validate/1.

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

get_dropdown_width(items)

View Source
Link to this function

handle_event(event, from, scene)

View Source

Callback implementation for Scenic.Scene.handle_event/3.

Link to this function

handle_input(arg1, item_id, scene)

View Source

Callback implementation for Scenic.Scene.handle_input/3.

Callback implementation for Scenic.Scene.init/3.

Callback implementation for Scenic.Component.validate/1.