Filter
Module Extensions
Section titled “Module Extensions”FilterCaptions (Extended from @revolist/revogrid)
Section titled “FilterCaptions (Extended from @revolist/revogrid)”interface FilterCaptions { /** * The title of the selection filter */ selectionTitle: string; /** * Placeholder for the selection filter search input. */ selectionSearchPlaceholder: string; /** * The title of the slider filter */ sliderTitle: string; /** * The title of the date filter */ dateTitle: string; /** * The popup header title before the column name. */ popupHeaderTitle: string; /** * The popup header separator between title and column name. */ popupHeaderSeparator: string; /** * Formats the popup header column name from the full column data. */ popupHeaderColumnName: (column: ShowData) => string; /** * Accessible label for the popup header filter icon when the column has active filters. */ popupHeaderActive: string; /** * The popup header close icon accessible label and title. */ popupHeaderClose: string; /** * The button label for opening the Pro expression filter editor. */ expressionButton: string; /** * The title shown above the expression editor. */ expressionTitle: string; /** * Placeholder text for the expression editor. */ expressionPlaceholder: string; /** * Accessible label for applying expression text immediately. */ expressionApply: string; /** * Label shown before expression validation errors. * @deprecated Expression validation details are now shown in the expression tooltip. */ expressionInvalid: string}ColumnFilterConfig (Extended from @revolist/revogrid)
Section titled “ColumnFilterConfig (Extended from @revolist/revogrid)”interface ColumnFilterConfig { /** * The configuration for the selection filter */ selection?: SelectionConfig; /** * The configuration for the slider filter. * * @example * ```ts * grid.filter = { * slider: { * showRangeDisplay: true, * showRangeInputs: true, * formatInputValue: value => value.toFixed(2), * parseInputValue: value => Number(value.replace(',', '.')), * }, * }; * ``` */ slider?: Pick< RangeSliderProps, 'showTooltips' | 'showRangeDisplay' | 'showRangeInputs' | 'formatValue' | 'formatInputValue' | 'parseInputValue' >; /** * The configuration for the Pro advanced filter popup header. */ popupHeader?: FilterPopupHeaderConfig; /** * Opt-in current-column expression editor for advanced filters. * When enabled, the popup appends an expandable expression panel below the regular filter controls. * Valid expressions compile into the existing `multiFilterItems` filter model. * * @example * ```ts * grid.filter = { * expressions: { * enabled: true, * applyDebounceMs: 300, * errorTooltipLabel: 'Expression validation details', * formatDiagnostic: diagnostic => translateExpressionDiagnostic(diagnostic), * }, * }; * ``` */ expressions?: boolean | ExpressionFilterConfig}Plugin API
Section titled “Plugin API”defineAdvancedFilterConfig
Section titled “defineAdvancedFilterConfig”export function defineAdvancedFilterConfig( config: AdvancedFilterConfig,): ColumnFilterConfig;AdvancedFilterConfig (Extended from index.ts)
Section titled “AdvancedFilterConfig (Extended from index.ts)”export type AdvancedFilterConfig = Omit<ColumnFilterConfig, 'localization'> & { localization?: AdvancedFilterLocalization;};AdvancedFilterLocalization (Extended from index.ts)
Section titled “AdvancedFilterLocalization (Extended from index.ts)”export type AdvancedFilterLocalization = Partial<Omit<CoreFilterLocalization, 'filterNames'>> & { filterNames?: Partial<CoreFilterLocalization['filterNames']>;};AdvanceFilterPlugin
Section titled “AdvanceFilterPlugin”Plugins
The AdvanceFilterPlugin extends the filtering capabilities of a RevoGrid component by introducing
advanced, customizable filter options, such as selection and range-based filters. This plugin enhances
the grid’s filter functionality, allowing users to interact with and manipulate data effectively.
Key Features:
- Custom Filters: Introduces custom filter types including
selectionandsliderfor more flexible data filtering. These filters allow users to select specific values or define a range for filtering data. - Event Integration: Listens for
BEFORE_HEADER_RENDER_EVENTto determine the applicability of filters for a given column, ensuring that only relevant filters are displayed. - Dynamic Content Rendering: Uses a
HyperFuncto dynamically render filter UI components in the grid’s header, including aRangeSlidercomponent and selection list rendering. - Enhanced Filter Management: Provides methods to manage excluded values from filters and to generate selection lists based on current data, facilitating complex filter interactions.
Usage:
- Integrate
AdvanceFilterPlugininto a RevoGrid instance to enable advanced filtering features. Add the plugin to the grid’s plugins array during initialization.
Example
Section titled “Example”import { AdvanceFilterPlugin } from '@revolist/revogrid-pro'
const grid = document.createElement('revo-grid');grid.plugins = [AdvanceFilterPlugin];This plugin is essential for applications that require sophisticated filtering mechanisms, enabling users to perform more nuanced data queries and enhancing the overall data exploration experience.
Dependencies
Section titled “Dependencies”- Optional
FilterPlugin: Replaces an existing core FilterPlugin while preserving its filter configuration.
class AdvanceFilterPlugin { initConfig(config: ColumnFilterConfig);
beforeshow(data: ShowData): void;
async headerclick(...args: Parameters<FilterPlugin['headerclick']>);
async onFilterChange(filterItems: Parameters<FilterPlugin['onFilterChange']>[0]);
async doFiltering(...args: Parameters<FilterPlugin['doFiltering']>);
isSelectionCascadeEnabled();
getContextAwareSelectionList( columnProp: ColumnProp, exlude = new Set<string>(), sourceRowTypes?: DimensionRows[], );
getExcludedValues(columnProp: ColumnProp);
getSelectionList( columnProp: ColumnProp, exlude = new Set<string>(), sourceRowTypes?: DimensionRows[], ):;
destroy();}getStartOfToday
Section titled “getStartOfToday”export function getStartOfToday(): Date;getStartOfYesterday
Section titled “getStartOfYesterday”export function getStartOfYesterday(): Date;getStartOfThisMonth
Section titled “getStartOfThisMonth”export function getStartOfThisMonth(): Date;getStartOfLastMonth
Section titled “getStartOfLastMonth”export function getStartOfLastMonth(): Date;getStartOfThisQuarter
Section titled “getStartOfThisQuarter”export function getStartOfThisQuarter(): Date;getStartOfThisYear
Section titled “getStartOfThisYear”export function getStartOfThisYear(): Date;getExtraByOperator
Section titled “getExtraByOperator”export function getExtraByOperator(operator: DateFilterOperator): ExtraField | undefined;FILTER_DATE
Section titled “FILTER_DATE”FILTER_DATE: string;filterOperators
Section titled “filterOperators”filterOperators: DateFilterOperator[];DateFilterOperatorWithDatePickerExtra
Section titled “DateFilterOperatorWithDatePickerExtra”export type DateFilterOperatorWithDatePickerExtra = | 'equals' | 'before' | 'after' | 'onOrBefore' | 'onOrAfter' | 'notEqual';DateFilterOperatorWithDateRangeExtra
Section titled “DateFilterOperatorWithDateRangeExtra”export type DateFilterOperatorWithDateRangeExtra = 'between';DateFilterOperator
Section titled “DateFilterOperator”export type DateFilterOperator = | 'notEqual' | 'isEmpty' | 'isNotEmpty' | 'today' | 'yesterday' | 'last7Days' | 'thisMonth' | 'lastMonth' | 'thisQuarter' | 'nextQuarter' | 'previousQuarter' | 'thisYear' | 'nextYear' | 'previousYear' | DateFilterOperatorWithDatePickerExtra | DateFilterOperatorWithDateRangeExtra;DateRangeValue
Section titled “DateRangeValue”interface DateRangeValue { operator: DateFilterOperator; fromDate?: string; toDate?: string}DATE_FILTERS
Section titled “DATE_FILTERS”DATE_FILTERS: Record<DateFilterOperator, CustomFilter<any, LogicFunctionExtraParam>>;SliderRange
Section titled “SliderRange”export type SliderRange = { fromValue: number; toValue: number };RangeSliderProps
Section titled “RangeSliderProps”Props for the RangeSlider component.
The slider keeps its own visual controls synchronized with optional editable
inputs. Use formatInputValue and parseInputValue together when the input
text must follow a custom number format, such as comma decimals.
Example:
* ```ts * slider: { * showRangeInputs: true, * formatValue: value => value.toFixed(2), * formatInputValue: value => value.toFixed(2).replace('.', ','), * parseInputValue: value => Number(value.replace(',', '.')), * } * ```interface RangeSliderProps { /** Minimum value for the range */ min: number; /** Maximum value for the range */ max: number; /** Current value for the start of the range */ fromValue: number; /** Current value for the end of the range */ toValue: number; /** Whether to show tooltips on hover */ showTooltips?: boolean; /** Whether to show the current range values above the slider */ showRangeDisplay?: boolean; /** Whether to show numeric inputs for editing the selected range */ showRangeInputs?: boolean; /** * Optional function to format values inside the editable inputs. * Defaults to `String(value)`, which keeps dot decimals independent of the * browser's localized number input rendering. */ formatInputValue?: (value: number) => string; /** * Optional function to parse editable input text back to a number. * Return `NaN` to ignore incomplete or invalid text while the user is typing. * The default parser accepts both dot and comma decimal separators. */ parseInputValue?: (value: string) => number; /** Callback fired when the range values change */ onRangeChange: (range: SliderRange) => void; /** * Optional function to format read-only labels and tooltips. * Editable inputs use `formatInputValue` so display labels and input text can * intentionally use different formats. */ formatValue?: (value: number) => string}SelectionItem
Section titled “SelectionItem”export type SelectionItem = { value: string; label: string; [key: string]: any };GetItemsFn
Section titled “GetItemsFn”export type GetItemsFn = (prop: ColumnProp) => Promise<SelectionItem[]> | SelectionItem[];SelectionItemTemplateProps
Section titled “SelectionItemTemplateProps”export type SelectionItemTemplateProps = { /** Current column prop for the selection filter popup. */ columnProp: ColumnProp; /** Original item returned by the default option loader or custom `selection.getItems`. */ item: SelectionItem; /** Normalized option value used by selection filtering. */ value: string; /** Display label for the option. */ label: string; /** Whether this option is currently included in the filter result. */ checked: boolean;};SelectionItemTemplate
Section titled “SelectionItemTemplate”export type SelectionItemTemplate = ( h: HyperFunc<VNode>, props: SelectionItemTemplateProps,) => any;SelectionGridSettings
Section titled “SelectionGridSettings”export type SelectionGridSettings = Partial<{ additionalData: HTMLRevoGridElement['additionalData']; autoSizeColumn: HTMLRevoGridElement['autoSizeColumn']; canFocus: HTMLRevoGridElement['canFocus']; colSize: HTMLRevoGridElement['colSize']; columnTypes: HTMLRevoGridElement['columnTypes']; editors: HTMLRevoGridElement['editors']; frameSize: HTMLRevoGridElement['frameSize']; hideAttribution: HTMLRevoGridElement['hideAttribution']; noHorizontalScrollTransfer: HTMLRevoGridElement['noHorizontalScrollTransfer']; range: HTMLRevoGridElement['range']; readonly: HTMLRevoGridElement['readonly']; resize: HTMLRevoGridElement['resize']; rowDefinitions: HTMLRevoGridElement['rowDefinitions']; rowHeaders: HTMLRevoGridElement['rowHeaders']; rowSize: HTMLRevoGridElement['rowSize']; theme: HTMLRevoGridElement['theme']; useClipboard: HTMLRevoGridElement['useClipboard'];}>;SelectionCascadeConfig
Section titled “SelectionCascadeConfig”export type SelectionCascadeConfig = { /** * Enables context-aware selection options. * When true, selection values are calculated from rows matching active filters * in other columns, excluding the current column filter itself. */ enabled?: boolean; /** * Shows active filter dependency order badges next to header filter icons. * Disabled by default. Set to true to show dependency badges. */ showDependencyNumbers?: boolean;};SelectionConfig
Section titled “SelectionConfig”export type SelectionConfig = { sortDirection?: 'asc' | 'desc' | 'none'; /** * Row stores used by the default selection option loader. * Defaults to all row stores for backward compatibility. Set to `['rgRow']` * to build options from the main data source only and ignore pinned rows. */ sourceRowTypes?: DimensionRows[]; /** * Controls whether typing in the selection popup search input also applies a * hidden `quickSearch` filter to the grid rows. * Defaults to true for backward compatibility. Set to false to only narrow * the popup option list while keeping the grid rows unchanged until checkbox * selection values are changed. */ quickSearchFiltering?: boolean; /** * Optional grouping for selection filter option rows. * - Pass a config to apply it globally to all selection-filter columns. * - Pass a record keyed by column prop to override per column. */ grouping?: GroupingOptions | Record<string, GroupingOptions>; /** * Provide a custom loader for selection list items. * - Pass a function to apply it globally to all columns. * - Pass a record keyed by column prop to override per column; * columns without an entry fall back to the default store-based lookup. */ getItems?: GetItemsFn | Record<string, GetItemsFn>; /** * Custom renderer for selection option content. * The plugin still renders and controls the checkbox; this template replaces * the label content next to it, so icons and custom item metadata can be shown * without changing selection semantics. * - Pass a function to apply it globally to all columns. * - Pass a record keyed by column prop to override per column. */ itemTemplate?: SelectionItemTemplate | Record<string, SelectionItemTemplate>; /** * Custom plugins for the nested selection option grid. * - Pass an array to apply it globally to all selection-filter columns. * - Pass a record keyed by column prop to override per column. */ plugins?: GridPlugin[] | Record<string, GridPlugin[]>; /** * Optional settings for the nested selection option grid. * `source`, `columns`, and `grouping` stay controlled by the filter list. * - Pass an object to apply it globally to all selection-filter columns. * - Pass a record keyed by column prop to override per column. */ gridSettings?: SelectionGridSettings | Record<string, SelectionGridSettings>; /** * Optional context-aware option loading for selection filters. */ cascadeOptions?: SelectionCascadeConfig;};FilterPopupHeaderConfig
Section titled “FilterPopupHeaderConfig”export type FilterPopupHeaderConfig = { /** * Hide the advanced filter popup header. */ hidden?: boolean;};FIlTER_SELECTION
Section titled “FIlTER_SELECTION”Selection filter type
FIlTER_SELECTION: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte";FIlTER_QUICK_SEARCH
Section titled “FIlTER_QUICK_SEARCH”Quick search filter type
FIlTER_QUICK_SEARCH: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte";FIlTER_SLIDER
Section titled “FIlTER_SLIDER”Slider filter type
FIlTER_SLIDER: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte";FIlTER_EXPRESSION
Section titled “FIlTER_EXPRESSION”Hidden Pro expression filter type.
FIlTER_EXPRESSION: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte";between
Section titled “between”between: LogicFunction<any, SliderRange | undefined>;mergeFilterConfigs
Section titled “mergeFilterConfigs”export function mergeFilterConfigs( base?: ColumnFilterConfig, override?: ColumnFilterConfig,): ColumnFilterConfig | undefined;createAdvancedFilterConfig
Section titled “createAdvancedFilterConfig”export function createAdvancedFilterConfig( config?: ColumnFilterConfig,): ColumnFilterConfig;createDefaultFilterTypes
Section titled “createDefaultFilterTypes”export function createDefaultFilterTypes(): Record<string, string[]>;resetFilterConfigState
Section titled “resetFilterConfigState”export function resetFilterConfigState(state:;expressionFilterFunction
Section titled “expressionFilterFunction”expressionFilterFunction: LogicFunction<any, LogicFunctionExtraParam>;ADVANCED_FILTERS
Section titled “ADVANCED_FILTERS”ADVANCED_FILTERS: { [FIlTER_SELECTION]: { columnFilterType: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; name: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; func: LogicFunction<any, LogicFunctionExtraParam>; }; [FIlTER_SLIDER]: { columnFilterType: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; name: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; func: LogicFunction<any, LogicFunctionExtraParam>; }; [FIlTER_QUICK_SEARCH]: { columnFilterType: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; name: "empty" | "none" | "notEmpty" | "eq" | "notEq" | "begins" | "contains" | "notContains" | "eqN" | "neqN" | "gt" | "gte" | "lt" | "lte"; func: LogicFunction<any, LogicFunctionExtraParam>; };};ADVANCED_FILTER_NAMES
Section titled “ADVANCED_FILTER_NAMES”ADVANCED_FILTER_NAMES: { [FIlTER_EXPRESSION]: string;};notContains
Section titled “notContains”notContains: LogicFunction<any, Set<any> | undefined>;popUpContent
Section titled “popUpContent”popUpContent: (data: ShowData, { multiFilterItems, onFilterItemsChange, subscribeFilterItemsChange, dataStores, getItems, itemTemplate, grouping, plugins, gridSettings, config, change, onClose, }: { multiFilterItems: MultiFilterItem; onFilterItemsChange: ProFilterItemsChangeListener; subscribeFilterItemsChange: ProFilterItemsChangeSubscription; dataStores: RowDataSources; getItems: () => SelectionItem[] | Promise<SelectionItem[]>; itemTemplate?: SelectionItemTemplate | undefined; grouping?: GroupingOptions | undefined; plugins?: typeof BasePlugin[] | undefined; gridSettings?: Partial<{ additionalData: AdditionalData; autoSizeColumn: boolean | AutoSizeColumnConfig; canFocus: boolean; colSize: number; columnTypes: { [name: string]: ColumnType<DataType<any, ColumnProp>>; }; editors: Editors; frameSize: number; hideAttribution: boolean; noHorizontalScrollTransfer: boolean; range: boolean; readonly: boolean; resize: boolean; rowDefinitions: RowDefinition[]; rowHeaders: boolean | RowHeaders; rowSize: number; theme: string; useClipboard: boolean | ClipboardConfig; }> | undefined; config?: ColumnFilterConfig | undefined; change(filterItems: MultiFilterItem): Promise<void>; onClose?(): void; }) => VNode;popUpBottomContent
Section titled “popUpBottomContent”popUpBottomContent: (data: ShowData, options: { multiFilterItems: MultiFilterItem; onFilterItemsChange: ProFilterItemsChangeListener; subscribeFilterItemsChange: ProFilterItemsChangeSubscription; getItems: () => SelectionItem[] | Promise<SelectionItem[]>; config?: ColumnFilterConfig | undefined; change(filterItems: MultiFilterItem): Promise<void>; }) => never[] | VNode;ProFilterItemsChangeDetail
Section titled “ProFilterItemsChangeDetail”export type ProFilterItemsChangeDetail = { prop: ColumnProp; multiFilterItems: MultiFilterItem;};ProFilterItemsChangeListener
Section titled “ProFilterItemsChangeListener”export type ProFilterItemsChangeListener = (detail: ProFilterItemsChangeDetail) => void;ProFilterItemsChangeSubscription
Section titled “ProFilterItemsChangeSubscription”export type ProFilterItemsChangeSubscription = ( listener: ProFilterItemsChangeListener,) => () => void;hasMeaningfulFilterValue
Section titled “hasMeaningfulFilterValue”export function hasMeaningfulFilterValue(value: unknown);hasActiveFiltersForColumn
Section titled “hasActiveFiltersForColumn”export function hasActiveFiltersForColumn( columnProp: ColumnProp | undefined, multiFilterItems: MultiFilterItem,);renderFilterPopupHeader
Section titled “renderFilterPopupHeader”export function renderFilterPopupHeader( data: ShowData,;FilterPopupHeaderOptions
Section titled “FilterPopupHeaderOptions”export type FilterPopupHeaderOptions = { multiFilterItems: MultiFilterItem; captions?: Partial<FilterCaptions>; onClose?(): void;};renderSliderControl
Section titled “renderSliderControl”Renders the dual native range inputs used as slider handles. Shared runtime helpers keep handle position, highlighted track, labels, tooltips, and optional editable inputs synchronized.
export function renderSliderControl(runtime: RangeSliderRuntime);renderRangeInputs
Section titled “renderRangeInputs”Renders optional editable range inputs for the selected slider range.
Inputs intentionally use type="text" with inputMode="decimal" so custom
formatters control comma/dot decimals instead of browser-localized number UI.
export function renderRangeInputs(runtime: RangeSliderRuntime);scaleSliderValue
Section titled “scaleSliderValue”export function scaleSliderValue(value: number, scaleFactor = SLIDER_SCALE_FACTOR);unscaleSliderValue
Section titled “unscaleSliderValue”export function unscaleSliderValue(value: number, scaleFactor = SLIDER_SCALE_FACTOR);normalizeSliderState
Section titled “normalizeSliderState”export function normalizeSliderState(;clampScaledValue
Section titled “clampScaledValue”export function clampScaledValue(value: number, minInt: number, maxInt: number);normalizeFromSlider
Section titled “normalizeFromSlider”export function normalizeFromSlider(fromValueInt: number, toValueInt: number);normalizeToSlider
Section titled “normalizeToSlider”export function normalizeToSlider(fromValueInt: number, toValueInt: number);normalizeFromInputValue
Section titled “normalizeFromInputValue”export function normalizeFromInputValue( value: number, currentToValueInt: number, state: Pick<ScaledSliderState, 'minInt' | 'maxInt'>, scaleFactor = SLIDER_SCALE_FACTOR,);normalizeToInputValue
Section titled “normalizeToInputValue”export function normalizeToInputValue( value: number, currentFromValueInt: number, state: Pick<ScaledSliderState, 'minInt' | 'maxInt'>, scaleFactor = SLIDER_SCALE_FACTOR,);toSliderRange
Section titled “toSliderRange”export function toSliderRange( fromValueInt: number, toValueInt: number, scaleFactor = SLIDER_SCALE_FACTOR,): SliderRange;toSliderDisplayValue
Section titled “toSliderDisplayValue”export function toSliderDisplayValue(valueInt: number, scaleFactor = SLIDER_SCALE_FACTOR);formatSliderInputValue
Section titled “formatSliderInputValue”export function formatSliderInputValue(value: number);parseSliderInputValue
Section titled “parseSliderInputValue”Default editable input parser.
Accepts both 640.42 and 640,42; returns NaN for empty text so partial
edits do not reset the current slider selection while the user is typing.
export function parseSliderInputValue(value: string);SLIDER_SCALE_FACTOR
Section titled “SLIDER_SCALE_FACTOR”Range inputs can contain decimals while native range inputs work most predictably with integers. Slider logic stores values as scaled integers and converts back to numbers only when displaying values or emitting filter state.
SLIDER_SCALE_FACTOR: 100;ScaledSliderState
Section titled “ScaledSliderState”export type ScaledSliderState = { minInt: number; maxInt: number; fromValueInt: number; toValueInt: number;};SliderStateInput
Section titled “SliderStateInput”export type SliderStateInput = { min: number; max: number; fromValue: number; toValue: number; scaleFactor?: number;};getCurrentRange
Section titled “getCurrentRange”export function getCurrentRange(runtime: RangeSliderRuntime);syncRangeText
Section titled “syncRangeText”export function syncRangeText(runtime: RangeSliderRuntime);updateTooltip
Section titled “updateTooltip”export function updateTooltip( slider: HTMLInputElement, tooltip: HTMLDivElement, state: ScaledSliderState, formatValue: NonNullable<RangeSliderProps['formatValue']>,);hideTooltip
Section titled “hideTooltip”export function hideTooltip(tooltip: HTMLDivElement);fillSlider
Section titled “fillSlider”export function fillSlider( from: HTMLInputElement, to: HTMLInputElement, controlSlider: HTMLInputElement,);syncVisuals
Section titled “syncVisuals”export function syncVisuals(runtime: RangeSliderRuntime);setToggleAccessible
Section titled “setToggleAccessible”export function setToggleAccessible(runtime: RangeSliderRuntime);emitRangeChange
Section titled “emitRangeChange”export function emitRangeChange(runtime: RangeSliderRuntime);preventInvalidNumberKey
Section titled “preventInvalidNumberKey”export function preventInvalidNumberKey(event: KeyboardEvent);RangeSliderRefs
Section titled “RangeSliderRefs”export type RangeSliderRefs = { fromSlider?: HTMLInputElement; toSlider?: HTMLInputElement; fromInput?: HTMLInputElement; toInput?: HTMLInputElement; fromLabel?: HTMLSpanElement; toLabel?: HTMLSpanElement; fromTooltip?: HTMLDivElement; toTooltip?: HTMLDivElement;};RangeSliderRuntime
Section titled “RangeSliderRuntime”export type RangeSliderRuntime = { refs: RangeSliderRefs; state: ScaledSliderState; formatValue: NonNullable<RangeSliderProps['formatValue']>; formatInputValue: NonNullable<RangeSliderProps['formatInputValue']>; parseInputValue: NonNullable<RangeSliderProps['parseInputValue']>; showTooltips: boolean; onRangeChange: RangeSliderProps['onRangeChange']; scheduleSyncVisuals: () => void; syncVisuals: () => void;};RangeSlider
Section titled “RangeSlider”RangeSlider renders a dual-handle range control for the Pro slider filter. The slider track and numeric inputs are separate controls that share one normalized scaled-value state.
RangeSlider: FunctionalComponent<RangeSliderProps>;isFilterOptionSourceRow
Section titled “isFilterOptionSourceRow”export function isFilterOptionSourceRow(row?: DataType);getFilterOptionSourceRows
Section titled “getFilterOptionSourceRows”export function getFilterOptionSourceRows( stores: RowDataSources, sourceRowTypes?: DimensionRows[],): DataType[];compileExpressionFilter
Section titled “compileExpressionFilter”export function compileExpressionFilter( text: string, context: ExpressionColumnContext,): ExpressionCompileResult;normalizeExpressionConfig
Section titled “normalizeExpressionConfig”Normalizes the public expression config into one internal shape with defaults.
Returns undefined when expressions are disabled so callers can keep opt-in
rendering, filter registration, and stale-state cleanup behind one predicate.
export function normalizeExpressionConfig( config?: ColumnFilterConfig['expressions'],): NormalizedExpressionConfig | undefined;evaluateExpression
Section titled “evaluateExpression”export function evaluateExpression(ast: ExpressionAst, value: unknown): boolean;expressionFilter
Section titled “expressionFilter”expressionFilter: LogicFunction<unknown, ExpressionFilterValue>;highlightExpression
Section titled “highlightExpression”export function highlightExpression(text: string, diagnostics: ExpressionDiagnostic[] = []);isCoreFilterType
Section titled “isCoreFilterType”export function isCoreFilterType(value: string): value is FilterType;isExpressionOperator
Section titled “isExpressionOperator”export function isExpressionOperator(value: string): value is ExpressionOperator;EXPRESSION_FILTER_OPERATORS
Section titled “EXPRESSION_FILTER_OPERATORS”EXPRESSION_FILTER_OPERATORS: { readonly empty: "empty"; readonly notEmpty: "notEmpty"; readonly eq: "eq"; readonly notEq: "notEq"; readonly begins: "begins"; readonly contains: "contains"; readonly notContains: "notContains"; readonly eqN: "eqN"; readonly neqN: "neqN"; readonly gt: "gt"; readonly gte: "gte"; readonly lt: "lt"; readonly lte: "lte"; };EXPRESSION_DATE_OPERATORS
Section titled “EXPRESSION_DATE_OPERATORS”EXPRESSION_DATE_OPERATORS: { readonly equals: "equals"; readonly before: "before"; readonly after: "after"; readonly onOrBefore: "onOrBefore"; readonly onOrAfter: "onOrAfter"; readonly between: "between"; readonly notEqual: "notEqual"; readonly isEmpty: "isEmpty"; readonly isNotEmpty: "isNotEmpty"; readonly today: "today"; readonly yesterday: "yesterday"; readonly last7Days: "last7Days"; readonly thisMonth: "thisMonth"; readonly lastMonth: "lastMonth"; readonly thisQuarter: "thisQuarter"; readonly nextQuarter: "nextQuarter"; readonly previousQuarter: "previousQuarter"; readonly thisYear: "thisYear"; readonly nextYear: "nextYear"; readonly previousYear: "previousYear"; };EXPRESSION_SELECTION_OPERATORS
Section titled “EXPRESSION_SELECTION_OPERATORS”EXPRESSION_SELECTION_OPERATORS: { readonly is: "is"; readonly in: "in"; readonly notIn: "notIn"; };EXPRESSION_SYMBOL_OPERATORS
Section titled “EXPRESSION_SYMBOL_OPERATORS”EXPRESSION_SYMBOL_OPERATORS: { readonly '=': "eq"; readonly '!=': "notEq"; readonly '>': "gt"; readonly '>=': "gte"; readonly '<': "lt"; readonly '<=': "lte"; };ExpressionFilterOperator
Section titled “ExpressionFilterOperator”export type ExpressionFilterOperator = | typeof EXPRESSION_FILTER_OPERATORS[keyof typeof EXPRESSION_FILTER_OPERATORS] | typeof EXPRESSION_DATE_OPERATORS[keyof typeof EXPRESSION_DATE_OPERATORS] | typeof EXPRESSION_SELECTION_OPERATORS[keyof typeof EXPRESSION_SELECTION_OPERATORS];ExpressionSymbolOperator
Section titled “ExpressionSymbolOperator”export type ExpressionSymbolOperator = keyof typeof EXPRESSION_SYMBOL_OPERATORS;ExpressionOperator
Section titled “ExpressionOperator”export type ExpressionOperator = ExpressionFilterOperator | ExpressionSymbolOperator;DATE_PERIOD_PHRASES
Section titled “DATE_PERIOD_PHRASES”DATE_PERIOD_PHRASES: { readonly today: "today"; readonly yesterday: "yesterday"; readonly 'last 7 days': "last7Days"; readonly 'this month': "thisMonth"; readonly 'last month': "lastMonth"; readonly 'this quarter': "thisQuarter"; readonly 'next quarter': "nextQuarter"; readonly 'previous quarter': "previousQuarter"; readonly 'this year': "thisYear"; readonly 'next year': "nextYear"; readonly 'previous year': "previousYear"; };VALUELESS_OPERATORS
Section titled “VALUELESS_OPERATORS”VALUELESS_OPERATORS: Set<ExpressionOperator>;LIST_OPERATORS
Section titled “LIST_OPERATORS”LIST_OPERATORS: Set<ExpressionOperator>;NUMERIC_OPERATORS
Section titled “NUMERIC_OPERATORS”NUMERIC_OPERATORS: Set<ExpressionOperator>;DATE_OPERATORS
Section titled “DATE_OPERATORS”DATE_OPERATORS: Set<ExpressionOperator>;SELECTION_OPERATORS
Section titled “SELECTION_OPERATORS”SELECTION_OPERATORS: Set<ExpressionOperator>;VALID_OPERATORS
Section titled “VALID_OPERATORS”VALID_OPERATORS: Set<ExpressionOperator>;OPERATOR_START_WORDS
Section titled “OPERATOR_START_WORDS”OPERATOR_START_WORDS: Set<string>;defineExpressionPanel
Section titled “defineExpressionPanel”export function defineExpressionPanel(el: HTMLElement, props: ExpressionPanelProps);ExpressionPanelProps
Section titled “ExpressionPanelProps”export type ExpressionPanelProps = { data: ShowData; multiFilterItems: MultiFilterItem; onFilterItemsChange: ProFilterItemsChangeListener; subscribeFilterItemsChange: ProFilterItemsChangeSubscription; config?: ColumnFilterConfig; getItems: () => Promise<SelectionItem[]> | SelectionItem[]; change(filterItems: MultiFilterItem): Promise<void>;};parseExpression
Section titled “parseExpression”export function parseExpression(text: string): ExpressionParseResult;serializeExpressionFilters
Section titled “serializeExpressionFilters”export function serializeExpressionFilters(filters: FilterData[] = []);replaceColumnFilters
Section titled “replaceColumnFilters”Creates the next filter item map after replacing one column’s expression-owned filters.
The advanced filter panel receives mutable filter state from the core filter panel, but expression apply logic should produce a fresh map before notifying sibling Pro controls. This keeps the helper reusable in tests and avoids hidden prop mutation from the expression UI.
export function replaceColumnFilters( multiFilterItems: MultiFilterItem, prop: ColumnProp, filters: FilterData[],): MultiFilterItem;syncFilterItemsTarget
Section titled “syncFilterItemsTarget”export function syncFilterItemsTarget( target: MultiFilterItem, source: MultiFilterItem,): void;tokenizeExpression
Section titled “tokenizeExpression”export function tokenizeExpression(text: string):;ExpressionBooleanOperator
Section titled “ExpressionBooleanOperator”Boolean operator supported by the advanced filter expression AST.
/** * Boolean operator supported by the advanced filter expression AST. */export type ExpressionBooleanOperator = 'and' | 'or';ExpressionAst
Section titled “ExpressionAst”Parsed expression tree used by the hidden expression filter evaluator.
/** * Parsed expression tree used by the hidden expression filter evaluator. */export type ExpressionAst = | ExpressionConditionNode | { kind: 'binary'; op: ExpressionBooleanOperator; left: ExpressionAst; right: ExpressionAst; };ExpressionConditionNode
Section titled “ExpressionConditionNode”Single current-column condition parsed from an expression.
/** * Single current-column condition parsed from an expression. */export type ExpressionConditionNode = { /** Condition node discriminator. */ kind: 'condition'; /** Optional field reference. Expressions may only reference the current column. */ field?: string; /** Filter, date, selection, or symbolic operator. */ operator: ExpressionOperator; /** Literal values consumed by the operator. */ values: ExpressionLiteral[];};ExpressionLiteral
Section titled “ExpressionLiteral”Literal value parsed from expression text.
/** * Literal value parsed from expression text. */export type ExpressionLiteral = string | number;ExpressionDiagnostic
Section titled “ExpressionDiagnostic”Validation or parsing diagnostic associated with an expression text range.
/** * Validation or parsing diagnostic associated with an expression text range. */export type ExpressionDiagnostic = { /** Human-readable diagnostic message. */ message: string; /** Inclusive start offset in the expression text. */ start: number; /** Exclusive end offset in the expression text. */ end: number;};ExpressionTokenType
Section titled “ExpressionTokenType”Token categories produced by the expression tokenizer.
/** * Token categories produced by the expression tokenizer. */export type ExpressionTokenType = | 'word' | 'string' | 'number' | 'operator' | 'paren' | 'comma' | 'invalid';ExpressionToken
Section titled “ExpressionToken”Token emitted by the expression tokenizer for parsing and highlighting.
/** * Token emitted by the expression tokenizer for parsing and highlighting. */export type ExpressionToken = { /** Token category. */ type: ExpressionTokenType; /** Raw token value without quote delimiters for string tokens. */ value: string; /** Inclusive start offset in the expression text. */ start: number; /** Exclusive end offset in the expression text. */ end: number;};ExpressionParseResult
Section titled “ExpressionParseResult”Result of parsing expression text.
/** * Result of parsing expression text. */export type ExpressionParseResult = { /** Parsed AST when expression syntax is valid enough to build one. */ ast?: ExpressionAst; /** Tokens produced from the source expression text. */ tokens: ExpressionToken[]; /** Parser and tokenizer diagnostics. */ diagnostics: ExpressionDiagnostic[];};ExpressionFilterValue
Section titled “ExpressionFilterValue”Hidden filter value stored in multiFilterItems for expression predicates.
/** * Hidden filter value stored in `multiFilterItems` for expression predicates. */export type ExpressionFilterValue = { /** Original expression text used for serialization back into the editor. */ text: string; /** Parsed expression tree used at filter evaluation time. */ ast: ExpressionAst;};ExpressionFilterConfig
Section titled “ExpressionFilterConfig”Configuration for the Pro advanced filter expression editor.
Expression filtering is opt-in through grid.filter.expressions. When enabled,
the advanced filter popup renders a current-column expression editor and compiles
valid expressions into the existing RevoGrid filter model.
/** * Configuration for the Pro advanced filter expression editor. * * Expression filtering is opt-in through `grid.filter.expressions`. When enabled, * the advanced filter popup renders a current-column expression editor and compiles * valid expressions into the existing RevoGrid filter model. */export type ExpressionFilterConfig = { /** * Enables or disables the expression editor. * Set to `false` to disable expressions when passing an object config. */ enabled?: boolean; /** * Delay in milliseconds before applying expression edits after typing. * Use `0` for immediate validation/application in tests or highly reactive UIs. */ applyDebounceMs?: number; /** * Label for the button that opens the expression editor. */ buttonLabel?: string; /** * Placeholder shown in the expression textarea when it is empty. */ placeholder?: string; /** * Accessible label/title for the validation tooltip trigger shown on invalid expressions. */ errorTooltipLabel?: string; /** * Formats an expression diagnostic for the validation tooltip. * * Use this to localize diagnostic text or map low-level parser/compiler messages * to product-specific wording. Multiple diagnostics are formatted individually * and joined with new lines. */ formatDiagnostic?: (diagnostic: ExpressionDiagnostic, diagnostics: ExpressionDiagnostic[]) => string;};NormalizedExpressionConfig
Section titled “NormalizedExpressionConfig”Expression configuration after defaults are applied.
/** * Expression configuration after defaults are applied. */export type NormalizedExpressionConfig = Required<ExpressionFilterConfig>;ExpressionColumnContext
Section titled “ExpressionColumnContext”Column-specific context needed to validate and compile expression text.
/** * Column-specific context needed to validate and compile expression text. */export type ExpressionColumnContext = { /** Current column property. */ prop: ColumnProp; /** Current column display name. */ name?: string; /** Filter panel column metadata. */ data: ShowData; /** Selection options available for current-column selection expressions. */ selectionItems?: ExpressionSelectionOption[];};ExpressionCompileResult
Section titled “ExpressionCompileResult”Result of compiling expression text into RevoGrid filter items.
/** * Result of compiling expression text into RevoGrid filter items. */export type ExpressionCompileResult = { /** Filter items that should replace current-column expression-owned filters. */ filters: FilterData[]; /** Validation diagnostics that should prevent applying filters when present. */ diagnostics: ExpressionDiagnostic[];};ExpressionSelectionOption
Section titled “ExpressionSelectionOption”Selection option available to expression selection operators.
/** * Selection option available to expression selection operators. */export type ExpressionSelectionOption = { /** Normalized selection value used by the selection filter model. */ value: string; /** User-facing selection label. */ label: string;};isEmptyValue
Section titled “isEmptyValue”Value normalization helpers shared by expression evaluation and future expression integrations. They intentionally mirror the lightweight coercion used by the existing Pro filter predicates instead of introducing a separate expression runtime.
Checks whether a value should be treated as empty by expression predicates.
export function isEmptyValue(value: unknown);normalizeExpressionText
Section titled “normalizeExpressionText”Normalizes a value for case-insensitive text and selection comparisons.
export function normalizeExpressionText(value: unknown);toExpressionNumber
Section titled “toExpressionNumber”Coerces a value for numeric expression comparisons.
export function toExpressionNumber(value: unknown);toExpressionDateTime
Section titled “toExpressionDateTime”Coerces a value to a timestamp for date expression comparisons.
export function toExpressionDateTime(value: unknown);isSameCalendarDate
Section titled “isSameCalendarDate”Compares values by their calendar date string, matching existing Pro date-filter semantics.
export function isSameCalendarDate(value: unknown, compare: unknown);isDateLikeValue
Section titled “isDateLikeValue”Detects values that should prefer date comparison over numeric comparison.
export function isDateLikeValue(value: unknown);normalizeSelectionFilterConfig
Section titled “normalizeSelectionFilterConfig”export function normalizeSelectionFilterConfig( config?: ColumnFilterConfig,): ColumnFilterConfig | undefined;resolveSelectionFilterConfig
Section titled “resolveSelectionFilterConfig”export function resolveSelectionFilterConfig( selection: SelectionConfig | undefined, prop: ColumnProp,): ResolvedSelectionFilterConfig;normalizeSelectionItems
Section titled “normalizeSelectionItems”export function normalizeSelectionItems(items: SelectionItem[]): SelectionItem[];ResolvedSelectionFilterConfig
Section titled “ResolvedSelectionFilterConfig”export type ResolvedSelectionFilterConfig = { getItems?: GetItemsFn; itemTemplate?: SelectionItemTemplate; grouping?: GroupingOptions; plugins?: GridPlugin[]; gridSettings?: SelectionGridSettings; sourceRowTypes?: DimensionRows[];};isSelectionFilterActive
Section titled “isSelectionFilterActive”export function isSelectionFilterActive(data: ShowData);renderSelectionContent
Section titled “renderSelectionContent”export function renderSelectionContent( data: ShowData,;SelectionContentOptions
Section titled “SelectionContentOptions”export type SelectionContentOptions = { multiFilterItems: MultiFilterItem; onFilterItemsChange: ProFilterItemsChangeListener; subscribeFilterItemsChange: ProFilterItemsChangeSubscription; getItems: () => Promise<SelectionItem[]> | SelectionItem[]; itemTemplate?: SelectionItemTemplate; grouping?: GroupingOptions; plugins?: GridPlugin[]; gridSettings?: SelectionGridSettings; config?: ColumnFilterConfig; change(filterItems: MultiFilterItem): Promise<void>;};createFilterDependencyBadgeController
Section titled “createFilterDependencyBadgeController”export function createFilterDependencyBadgeController( plugin: FilterDependencyBadgePlugin, getFilterConfig: () => ColumnFilterConfig | undefined,): FilterDependencyBadgeController;getContextAwareSelectionList
Section titled “getContextAwareSelectionList”export function getContextAwareSelectionList( plugin: FilterPluginLike, columnProp: ColumnProp, exclude = new Set<string>(), sourceRowTypes?: DimensionRows[],): SelectionItem[];parseValue
Section titled “parseValue”export function parseValue( originalValue: string | undefined, originalLabel?: string,):;parseSelectionValues
Section titled “parseSelectionValues”export function parseSelectionValues( originalValue: unknown, originalLabel?: string,):;getSelectionValueKeys
Section titled “getSelectionValueKeys”export function getSelectionValueKeys(value: unknown): string[];SelectionGrid
Section titled “SelectionGrid”SelectionGrid: ({ columnProp, rows, itemTemplate, grouping, plugins, gridSettings, onCheckedChange, }: SelectionGridProps) => preact.JSX.Element;List: ({ columnProp, subscribeFilterItemsChange, getItems, exclude: initialExclude, search, searchPlaceholder, filter, quickFilter, sortDirection, itemTemplate, grouping, plugins, gridSettings, }: ListProps) => preact.JSX.Element;defineList
Section titled “defineList”defineList: (el: HTMLElement, props: ListProps) => void;Search
Section titled “Search”Search: ({ search, selectAll, searchValue, placeholder, allSelected, }: SearchProps) => preact.JSX.Element;SelectionListOption
Section titled “SelectionListOption”export type SelectionListOption = { text: string; checked: boolean; item: SelectionItem;};SelectionListRow
Section titled “SelectionListRow”export type SelectionListRow = { value: string; label: string; checked: boolean; item: SelectionItem; [key: string]: any;};ListProps
Section titled “ListProps”interface ListProps { columnProp: ColumnProp; subscribeFilterItemsChange?: ProFilterItemsChangeSubscription; getItems: () => Promise<SelectionItem[]> | SelectionItem[]; exclude?: Set<string>; search?: string; searchPlaceholder?: string; filter: (excluded: Set<string>) => void; quickFilter: (txt: string) => void; sortDirection?: 'asc' | 'desc' | 'none'; itemTemplate?: SelectionItemTemplate; grouping?: GroupingOptions; plugins?: GridPlugin[]; gridSettings?: SelectionGridSettings}EMPTY_EXCLUDE
Section titled “EMPTY_EXCLUDE”EMPTY_EXCLUDE: Set<string>;FILTER_LIST_ROW_HEIGHT
Section titled “FILTER_LIST_ROW_HEIGHT”FILTER_LIST_ROW_HEIGHT: 28;FILTER_LIST_MAX_VISIBLE_ROWS
Section titled “FILTER_LIST_MAX_VISIBLE_ROWS”FILTER_LIST_MAX_VISIBLE_ROWS: 8;FILTER_LIST_MAX_HEIGHT
Section titled “FILTER_LIST_MAX_HEIGHT”FILTER_LIST_MAX_HEIGHT: number;normalizeSelectionValue
Section titled “normalizeSelectionValue”export function normalizeSelectionValue(value?: string);createSelectionMap
Section titled “createSelectionMap”export function createSelectionMap(items: SelectionItem[], exclude: Set<string>);filterSelectionMapBySearch
Section titled “filterSelectionMapBySearch”export function filterSelectionMapBySearch( data: Map<string, SelectionListOption>, searchText: string,);sortSelectionRows
Section titled “sortSelectionRows”export function sortSelectionRows( filteredData: Map<string, SelectionListOption>, sortDirection?: 'asc' | 'desc' | 'none',): SelectionListRow[];countGroupedSelectionRows
Section titled “countGroupedSelectionRows”export function countGroupedSelectionRows(rows: SelectionListRow[], groupingProps: ColumnProp[] = []);