PhoenixKitProjects.Extensions.ConfigOptions (PhoenixKitProjects v0.21.0)

Copy Markdown View Source

Option resolution for extension config_schema :select fields — shared by the Modules & Features panel and the creation form (extracted from the panel LV when the form grew inline extension config).

The descriptor may carry a literal option list or a lazy {module, fun} (0-arity; providers with data-driven options — the dashboards picker). Entries normalize to %{value:, label:}; a provider failure degrades to []. The STORED value always appears (even when the provider no longer offers it) so a stale link is visible instead of silently blanked.

Summary

Types

option()

@type option() :: %{value: String.t(), label: String.t()}

Functions

resolve(field, current)

@spec resolve(map(), String.t() | nil) :: [option()]