Function: computeIsDirty()
function computeIsDirty(
view: ViewPayload,
urlValues: FilterValues,
filters: FilterConfig[]
): boolean;Defined in: shared/datatable/views/lib/is-dirty.ts:20
Compare a view's stored filters against the URL-derived filter state and return true iff they don't match. "Match" is filter-aware:
- Radio: a URL value equal to the filter's
defaultValueis treated as unset, so loading a view that stores a non-default radio choice does not flag dirty on first paint (before the materialize-on-mount effect writes the view's filters into the URL). - Multiselect: an empty/missing URL array equals "not set".
- Date-range:
{from: null, to: null}equals "not set".
A view filter the user has cleared (URL value reverts to default while the view still stores a non-default value) IS dirty — the comparison is by "active" state on both sides, not just by overlay-non-emptiness.
Parameters
| Parameter | Type |
|---|---|
view | ViewPayload |
urlValues | FilterValues |
filters | FilterConfig[] |
Returns
boolean