Skip to content

isDisplayValueEmpty

isDisplayValueEmpty(value): boolean

Defined in: packages/core/src/fields/utils.ts:679

Whether a field’s value counts as empty for a READ-ONLY display’s own ”—” placeholder and its copy button’s disabled state — undefined, null, "", or an empty array. Deliberately narrower than JS truthiness: 0 and false are legitimate non-empty values for a number/checkbox field, so neither counts as empty here.

Shared by every Display component’s own ”—” check and the peek’s copy button (polish round) — one rule, not two definitions of “nothing to show” that could drift apart.

unknown

The raw field value to test.

boolean

true for undefined/null/""/[], false otherwise.