UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

102 lines (101 loc) 3.58 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { CompositeFilterDescriptor } from '@progress/kendo-data-query'; import { GridColumnMenuFilterUIProps } from '../interfaces/GridColumnMenuFilterUIProps.js'; import { GridColumnMenuFilterBaseProps } from '../interfaces/GridColumnMenuFilterBaseProps.js'; import { ComponentType } from 'react'; import * as React from 'react'; /** * @hidden */ export declare const rootFilterOrDefault: (rootFilter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor; /** * @hidden */ export declare const filterGroupByField: (field: string, filter: CompositeFilterDescriptor | undefined) => CompositeFilterDescriptor | null; /** * Can be used to check if filtering is applied to a specific field ([see example](https://www.telerik.com/kendo-react-ui/components/grid/columns/column-menu#toc-styling-the-column-menu-icon)). Useful for creating active filter indicators. */ export declare const isColumnMenuFilterActive: (field: string, filter?: CompositeFilterDescriptor) => boolean; /** * The props of the GridColumnMenuFilter component. */ export interface GridColumnMenuFilterProps extends GridColumnMenuFilterBaseProps { /** * Controls the expand state of the filter component. */ expanded?: boolean; /** * Triggered on each subsequent expand state of the filter component. */ onExpandChange?: (nextExpandState: boolean) => void; /** * If set to `false`, the second filter operator and the input will be hidden. */ hideSecondFilter?: boolean; /** * Specifies a React element that will be cloned and rendered inside the UI of the column-menu filter component * ([see example](https://www.telerik.com/kendo-react-ui/components/grid/columns/column-menu#toc-customizing-the-filter-component)). */ filterUI?: ComponentType<GridColumnMenuFilterUIProps>; /** * The child elements to be rendered inside the filter component. */ children?: React.ReactNode; /** * If set to `true`, filter expand button will not be rendered and filter menu will be expanded. */ alwaysExpand?: boolean; } /** * @example * ```jsx-no-run * const TextColumnMenu = (props) => { * return ( * <div> * <GridColumnMenuSort {...props} /> * <GridColumnMenuFilter {...props} /> * </div> * ); * }; * * const App = () => { * const [state, setState] = React.useState( * createAppState({ * take: 10, * skip: 0, * }) * ); * * function createAppState(dataState) { * return { * result: process(products.slice(0), dataState), * dataState: dataState, * }; * } * * const dataStateChange = (event) => { * setState(createAppState(event.dataState)); * }; * * return ( * <Grid * data={state.result} * {...state.dataState} * onDataStateChange={dataStateChange} * sortable={true} * pageable={true} * > * <GridColumn field="ProductID" title="Product ID" /> * <GridColumn field="ProductName" columnMenu={TextColumnMenu} /> * </Grid> * ); * }; * ``` */ export declare const GridColumnMenuFilter: (props: GridColumnMenuFilterProps) => React.JSX.Element;