mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix filterDropdown type
This commit is contained in:
parent
b41f9d6b00
commit
969c171da1
@ -261,7 +261,7 @@ class FilterMenu<T> extends React.Component<FilterMenuProps<T>, FilterMenuState<
|
||||
confirm: this.handleConfirm,
|
||||
clearFilters: this.handleClearFilters,
|
||||
filters: column.filters,
|
||||
getPopupContainer: (triggerNode: HTMLElement) => triggerNode.parentNode,
|
||||
getPopupContainer: (triggerNode: HTMLElement) => triggerNode.parentNode as HTMLElement,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,16 @@ export type ColumnFilterItem = {
|
||||
children?: ColumnFilterItem[];
|
||||
};
|
||||
|
||||
export interface FilterDropdownProps {
|
||||
prefixCls?: string;
|
||||
setSelectedKeys?: (selectedKeys: string[]) => void;
|
||||
selectedKeys?: string[];
|
||||
confirm?: () => void;
|
||||
clearFilters?: (selectedKeys: string[]) => void;
|
||||
filters?: ColumnFilterItem[];
|
||||
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
||||
}
|
||||
|
||||
export interface ColumnProps<T> {
|
||||
title?:
|
||||
| React.ReactNode
|
||||
@ -24,7 +34,7 @@ export interface ColumnProps<T> {
|
||||
filters?: ColumnFilterItem[];
|
||||
onFilter?: (value: any, record: T) => boolean;
|
||||
filterMultiple?: boolean;
|
||||
filterDropdown?: React.ReactNode | ((props: Object) => React.ReactNode);
|
||||
filterDropdown?: React.ReactNode | ((props: FilterDropdownProps) => React.ReactNode);
|
||||
filterDropdownVisible?: boolean;
|
||||
onFilterDropdownVisibleChange?: (visible: boolean) => void;
|
||||
sorter?: boolean | CompareFn<T>;
|
||||
|
Loading…
Reference in New Issue
Block a user