WarUI

Filter model API and events

GRID-A10-F21P0baselinePlanned

A documented, versioned JSON filter model can be read, written, merged and validated programmatically, with granular change events. A stable model enables persistence, deep links and integration with a server.

Planned. This page shows the specification from issue #187. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid with an editable JSON panel and a URL-hash mirror.

Expected behavior

Editing the JSON and applying it updates the UI filters. Invalid JSON or an unknown operator shows validation errors without applying anything. Reloading with the hash restores the state. Events identify their source as api, ui, preset or chip.

Planned API surface

getFilterModel()setFilterModel(model)mergeFilterModel(partial)validateFilterModel(model)filterModel.versiononFilterChangedonFilterModifiedfilterChangeSource

Acceptance criteria

  • Calling setFilterModel(getFilterModel()) is a no-op that produces an identical model and fires no event. (pending)
  • setFilterModel replaces the whole model; mergeFilterModel only touches the specified columns. (pending)
  • validateFilterModel returns structured errors (path, code) and never throws. (pending)
  • onFilterModified fires while the user is editing; onFilterChanged fires once the filter is applied. (pending)
  • The model includes a version field, and older versions are migrated or rejected according to a documented policy. (pending)
  • References to unknown columns are ignored with a warning. (pending)