AshUi.Patch.Keys (ash_ui v0.1.0)

Copy Markdown View Source

THE entry-key function for keyed collections — one identity rule shared by the live renderer and the binding resolver, implementing Ash resource identity correctly:

  1. an authored key: expression wins when declared;
  2. an Ash resource keys on its FULL primary key — a composite key is the tuple of its values (first-field-only keying collides);
  3. plain maps fall back to :id/"id", then ordinal position.

Summary

Functions

Entry key for item at ordinal index, honoring key_eval when present.

Functions

entry_key(item, index, key_eval \\ nil, scope \\ nil)

@spec entry_key(term(), non_neg_integer(), AshUi.Patch.Evaluator.t() | nil, term()) ::
  term()

Entry key for item at ordinal index, honoring key_eval when present.