You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(views): ListView reads the spec-canonical filter (#2890) (#2935)
Third rename in the ListView vocabulary migration: `filters` → `filter`. Unlike
the first two this closes a live bug, because the fork was asymmetric.
ListView was the ONLY surface reading `filters`. Every child view — ObjectGrid,
ObjectGallery, ObjectKanban, ObjectCalendar, ObjectGantt, ObjectMap, ObjectTree,
ObjectChart — reads `filter`, and ListView handed them `filters`. Wherever a
child fetches its own rows instead of receiving ListView's, the base filter was
dropped: a `chart` list view aggregated the whole object, because the chart
branch emitted `filters:` and ObjectChart reads `schema.filter`.
Conversely a spec-authored view carrying `filter` — what the spec says, and what
runtime-metadata-persistence and "Save as view" already persist — rendered
unfiltered in ListView, because nothing read that key.
Key rename only: both keys carry an ObjectQL FilterNode array everywhere in
objectui and every consumer passes the value straight to `$filter`. The spec
types `filter` as ViewFilterRule[], so the field is typed from the spec but used
as something else — noted in the normalizer, left alone here, since converting
formats inside a vocabulary fold would change what reaches the data source.
Also collapses a duplicated computation in app-shell's ObjectView, which built
the same effective filter twice (once as `filter` for the children, once as
`filters` for ListView) with the copies subtly different — only one fell back to
listSchema.filter, only the other substituted tokens in the URL filters. One
computation now, keeping both behaviors.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
},[schema.objectName,schema.data,dataSource,schema.filters,effectivePageSize,currentSort,currentFilters,userFilterConditions,refreshKey,searchTerm,schema.searchableFields,expandFields,objectDefLoaded,schema.refreshTrigger,perms,serverPage,currentView,groupingConfig,ganttOwnsData]);// Re-fetch on filter/sort/search/refreshTrigger/perms/page change
1123
+
},[schema.objectName,schema.data,dataSource,schema.filter,effectivePageSize,currentSort,currentFilters,userFilterConditions,refreshKey,searchTerm,schema.searchableFields,expandFields,objectDefLoaded,schema.refreshTrigger,perms,serverPage,currentView,groupingConfig,ganttOwnsData]);// Re-fetch on filter/sort/search/refreshTrigger/perms/page change
1124
1124
1125
1125
// Any change to the result-defining inputs (object, filters, sort, search,
1126
1126
// grouping, page size) invalidates the current page number — snap back to
0 commit comments