Fluent Commerce Logo
Docs
Sign In

Filter Panel: Configuration, Customization, and Best Practices

How-to Guide

Author:

Yulia Andreyanova

Changed on:

9 Jan 2025

Key Points

  • This guide provides step-by-step instructions on setting up and customizing the Filter Panel component to filter data effectively, whether on standalone pages or embedded within the List component to filter an inner list.
  • Discover how to define data sources, integrate custom queries, and display query results seamlessly using descendant components.
  • Explore options to customize fields: modify field types, set default values, rearrange the field order, and remove unnecessary fields.
  • Unlock the component's key functionality—synchronizing filter data with the URL. This enables easy sharing of pre-filtered views through links.
  • Learn how to configure default filter values using settings for a streamlined and consistent user experience.
No alt text provided

Steps

Step arrow right iconAdd the Component Skeleton to the Manifest

First, add the basic structure for the

`fc.filterPanel`
in the manifest:

1{
2  "component": "fc.filterPanel",
3  "props": {
4    "overrides": {},
5    "exclude": []
6  }
7}
8

Language: plain_text

Name: Basic Structure

Description:

Filter Panel Component basic structure

Step arrow right iconDefine the Data Source for the Filter Panel

  • If you are using the default Page query, no further steps are needed.
  • For custom queries, add the
    `query`
    ,
    `variables`
    , and
    `descendants`
    properties.
  • `query`
    defines the GraphQL query for filtering.
  • `variables`
    supply query parameters.
  • `descendants`
    define components to display the query results.
1{
2  "component": "fc.filterPanel",
3  "props": {
4    "noCard": true,
5    "query": "query virtualPositions {...}",
6    "variables": { "someVariable": "value" },
7    "descendants": [
8      {
9        "component": "fc.list",
10        "dataSource": "virtualPositions",
11        "props": {
12          "attributes": [
13            {
14              "label": "Virtual Catalogue",
15              "value": "{{node.catalogue.name}}"
16            },
17            {
18              "label": "Available Quantity",
19              "value": "{{node.quantity}}"
20            }
21          ]
22        }
23      }
24    ]
25  }
26}
27

Language: plain_text

Name: Custom Query and Components

Description:

Example for a custom query and components to display the query results

Result

Once configured, the filter panel will display all available default fields based on the page query or custom query.

Step arrow right iconExclude Unnecessary Fields

If you see fields that you don’t need, exclude them by adding their lowercase names to the

`exclude`
property:
`"exclude": ["createdon", "ref", "type", "onhand"]`
.

Step arrow right iconCustomize Fields Using Overrides

Using the

`overrides`
property, you can change the type, label, default values, or field order. Additionally, you can enable multi-select functionality for dropdowns, populate dropdown options dynamically, and customize the behavior of filters on the filter panel to align with specific business requirements

1{
2 "overrides": {
3   "status": {
4     "component": "select",
5     "label": "fc.uvoi.inventorySearch.filterPanel.field.status.label",
6     "multiple": true,
7     "sortPrefix": 1,
8     "extensions": {
9       "hideDefaultValue": true,
10       "source": "fc.mystique.inventory.search.inventory.position.stock.statuses"
11     }
12   },
13   "onHandRange": {
14     "label": "fc.uvoi.inventorySearch.filterPanel.field.onHandRange.label",
15     "sortPrefix": 2
16    }
17  }
18}

Language: json

Name: Example 1

Description:

An example demonstrating how to change a field type, adjust the order of fields on the filter panel, enable multi-select functionality, and populate dropdown options within a filter on the filter panel.

1{
2   "catalogue": {
3    "component": "select",
4    "defaultValue": "{{settings.default_ic}}",
5    "extensions": {
6      "source": "fc.mystique.inventory.search.catalogues"
7    }
8  }
9}

Language: json

Name: Example 2

Description:

Set a Default Value for a Field

For more details on

`overrides`
, refer to the Component description.

Step arrow right iconConfigure Default Values Using Settings

Add settings as follows to define default values for fields. 

1{
2    "settings": [
3    {
4        "name": "fc.oms.inventory.search.product.catalogue.default",
5        "alias": "default_pc"
6    }
7  ]
8}

Language: json

Name: Defaults for Filters: Setting Configuration

Description:

`name`
: Full name of the setting.

`alias`
: A short name for internal use in the manifest.

Copyright © 2025 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo