Kaizen
Browse modulesData tabledatatable/sharedFunctions

Function: formatFilterChipValue()

function formatFilterChipValue(
   filter: FilterConfig, 
   value: FilterValue, 
   options?: FilterOption[]
): string | null;

Defined in: shared/datatable/lib/filter-state.ts:142

Render a filter's value as a chip-friendly string, or null when the filter is inactive. Multiselect labels are resolved through options, falling back to a humanized form of the raw value when no option matches.

For multiselect, humanization is a FALLBACK: a consumer-supplied FilterOption.label wins verbatim, so "VIP only" never becomes "Vip only".

Radio has no override because RadioFilterConfig.options is readonly string[] — there is no per-value label to prefer, and options is never populated for a radio key. Adding one means widening that public type (PLA-385).

Parameters

ParameterTypeDefault value
filterFilterConfigundefined
valueFilterValueundefined
optionsFilterOption[][]

Returns

string | null

On this page