catalog.fn.metadata()
Returns metadata about the list and its data. Provides information about the model, current query state, item counts, available attributes, and views.
Syntax
Return Type
Returns a ListMetadata object:
Usage Notes
- Use currentSize vs initialSize to show "X of Y items" in filter UIs
- attributes array describes all available fields for filtering and display
- appliedQuery reflects the current filter state for debugging or persistence
- No parameters required - returns metadata for the list in its current state
Related Methods
catalog.query.count()- Get count of matching itemscatalog.fn.facets()- Get filter options for an attributecatalog.query.current()- Get current query state
Examples
Building a Pagination Component
Calculate current page, total pages, and page range using metadata for custom pagination UI.