Saved views and filter controls

Pro

Save pinned views, filter chips, multi-select/range filters, sort order, and visible columns with SavedViewControls.

Install
Sample view
Controls

Installation

Install command

Writes app/components/filter-controls.tsx and adds @shopify/polaris-types@2.0.0 once authenticated.

API reference

filtersRequired
readonly FilterDescriptor[]Configure select dropdowns, multi-select checklists, and numeric min/max range filters. Active filters surface as removable chips.
Required
sorts / columnsRequired
FilterControlsProps['options'] / readonly { id: string; label: string }[]Provide sort options and toggleable columns placed in a Columns popover.
Required
defaultVisibleColumns
readonly string[]Enable a Reset to defaults action inside the Columns popover when visible columns differ.
Optional
settings / onSettingsChangeRequired
ViewSettings / (settings: ViewSettings) => voidControl search query, active filters, sort order, and visible columns.
Required
views / activeViewIdRequired
readonly SavedView[] / string | nullLoad merchant-scoped views with optional pinned flags; pinned views stay first beside Default.
Required
onSelectViewRequired
(id: string | null) => voidSwitch between the default view tab and saved view tabs.
Required
defaultViewLabel
stringLabel for the first tab representing the default view.
"Default"
onCreateViewRequired
(name: string, settings: ViewSettings) => void | Promise<void>Persist a newly saved view with its active query, filters, columns, and sort order.
Required
onUpdateView
(id: string, settings: ViewSettings) => void | Promise<void>Enable saving unsaved changes to an existing view and persist its query, filters, columns, and sort order.
Optional
onDuplicateView
(view: SavedView) => void | Promise<void>Duplicate the active saved view from the view actions menu.
Optional
onTogglePinView
(id: string) => void | Promise<void>Pin or unpin the active saved view so pinned views stay grouped first.
Optional
onRenameView / onDeleteViewRequired
(id: string, name: string) => void | Promise<void> / (id: string) => void | Promise<void>Persist the new name or delete the view from the active view menu.
Required
showSearch / searchLabel / disabled
boolean / string / booleanOptionally include a search bar inside SavedViewControls and disable controls during async loads.
false

Run under Shopify App Home AppProvider. Point polarisUrl to the Polaris 2.0 runtime.

Place SavedViewControls inside an s-table filters slot for an IndexFilters-style toolbar with search, view tabs, multi-select & range filters popover, removable filter chips, and a Columns popover, or use FilterControls by itself for one dropdown.