defaultOperator (hooks/useColumnFilter.ts)

react-data-table-component · src/hooks/useColumnFilter.ts · typescript · Apache-2.0
ui

Provides hooks and utilities for filtering table columns in React data tables.

// Source: https://github.com/jbetancur/react-data-table-component | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react';
import type { TableColumn, FilterState, FilterCondition, FilterOperator, FilterType, Localization } from '../types';

/**
 * Column-filter feature slice — the head-side transport for filter state.
 * `filterValues` changes identity per applied filter (legitimate re-render);
 * DataTableHead extracts each column's own value so TableCol memoization
 * stays per-column.
 */
export type FilteringSlice = {
	filterValues: Record<string | number, FilterState>;
	localization: NonNullable<Localization['filter']>;
	onFilterChange: (columnId: stri

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key