Controlled collection identity and optional logical index.
Use an index when the selected or revealed item may be outside the currently
loaded source slice. assigns/2 converts the value to component options for
either controlled selection or reveal behavior.
Summary
Functions
Returns :selected assigns for the controlled identity.
Builds a controlled collection identity with an optional logical index.
Types
@type t() :: %GPUI.UI.Collection.Selection{ id: String.t() | nil, index: non_neg_integer() | nil }
Functions
Returns :selected assigns for the controlled identity.
@spec new(String.t() | nil, non_neg_integer() | nil) :: t()
Builds a controlled collection identity with an optional logical index.