BeamConsoleWeb.Console.OrderedStream (beam_console v0.3.0)

Copy Markdown View Source

Tracks ordered stream identifiers so stable orders retain DOM identity.

Ordered rows only need positional reinsertion when their identifier order changes. Value-only updates can then preserve focus and pointer continuity.

Summary

Functions

Returns ordered identifiers for stream items.

Returns whether the current ordered identifiers differ from the previous order.

Types

item()

@type item() :: %{id: String.t()}

Functions

ids(items)

@spec ids([item()]) :: [String.t()]

Returns ordered identifiers for stream items.

reordered?(previous_ids, current_ids)

@spec reordered?([String.t()], [String.t()]) :: boolean()

Returns whether the current ordered identifiers differ from the previous order.