GPUI.UI.Collection.Source (gpui_components v0.2.0)

Copy Markdown View Source

Cohesive source-backed collection window.

A source window pairs the total logical item count with the offset and loaded child slice currently present in the snapshot. assigns/1 converts it to the ordinary options accepted by GPUI.UI.virtual_list/1, data_table/1, and tree/1.

Summary

Functions

Returns component assigns for a source-backed collection window.

Builds and validates a loaded source-backed collection window.

Types

t()

@type t() :: %GPUI.UI.Collection.Source{
  items: [GPUI.Element.child()],
  offset: non_neg_integer(),
  total_count: non_neg_integer()
}

Functions

assigns(source)

@spec assigns(t()) :: map()

Returns component assigns for a source-backed collection window.

new(total_count, offset, items)

Builds and validates a loaded source-backed collection window.