Skip to content

Commit

Permalink
fix: add missing gridFilterInputComponent.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk committed Jan 15, 2025
1 parent c713f3c commit e292d7b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/x-data-grid/src/models/gridFilterInputComponent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as React from 'react';
import { TextFieldProps } from './gridBaseSlots';
import { GridFilterItem } from './gridFilterItem';
import type { GridApiCommon } from './api/gridApiCommon';
import type { GridApiCommunity } from './api/gridApiCommunity';

export type GridFilterInputComponentProps<Api extends GridApiCommon = GridApiCommunity> = {
item: GridFilterItem;
applyValue: (value: GridFilterItem) => void;
// Is any because if typed as GridApiRef a dep cycle occurs. Same happens if ApiContext is used.
apiRef: React.RefObject<Api>;
inputRef?: React.Ref<any>;
focusElementRef?: React.Ref<any>;
clearButton?: React.ReactNode | null;
/**
* It is `true` if the filter either has a value or an operator with no value
* required is selected (for example `isEmpty`)
*/
isFilterActive?: boolean;
onFocus?: React.FocusEventHandler;
onBlur?: React.FocusEventHandler;
} & Pick<
TextFieldProps,
'color' | 'error' | 'helperText' | 'size' | 'variant' | 'disabled' | 'label' | 'placeholder' | 'tabIndex'
>;

0 comments on commit e292d7b

Please sign in to comment.