sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function cascading

cascading(filters, config?): Filter

Creates a filter that contains a list of dependent/cascading filters, where each filter depends on the results or state of the previous ones in the array.

Each filter in the array operates in the context of its predecessors, and the cascading behavior ensures that all filters are applied sequentially.

Parameters

ParameterTypeDescription
filtersFilter[]Array of dependent filters
config?BaseFilterConfigOptional configuration for the filter

Returns

Filter

A filter instance

Example

// Create a cascading filter for gender and age range
const cascadingFilter = filterFactory.cascading(
  [
    filterFactory.members(DM.Commerce.Gender, ['Male', 'Female']),
    filterFactory.members(DM.Commerce.AgeRange, ['0-18']),
  ],
  { disabled: true }, // Optional configuration to disable the cascading filter
);
Last Updated: