typo(table): Supplement FilterDropdown type (#7226)

* fix(table): Supplement FilterDropdown type

* docs(table): Type format
pull/7288/head^2
Light 11 months ago committed by GitHub
parent f034a7759e
commit 8ab008d255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,9 +28,9 @@ import type { CheckboxChangeEvent } from '../../../checkbox/interface';
import devWarning from '../../../vc-util/devWarning';
import isEqual from '../../../vc-util/isEqual';
interface FilterRestProps {
confirm?: Boolean;
closeDropdown?: Boolean;
interface FilterResetProps {
confirm?: boolean;
closeDropdown?: boolean;
}
const { SubMenu, Item: MenuItem } = Menu;
@ -279,7 +279,7 @@ export default defineComponent<FilterDropdownProps<any>>({
};
const onReset = (
{ confirm, closeDropdown }: FilterRestProps = { confirm: false, closeDropdown: false },
{ confirm, closeDropdown }: FilterResetProps = { confirm: false, closeDropdown: false },
) => {
if (confirm) {
internalTriggerFilter([]);

@ -258,11 +258,20 @@ interface FilterDropdownProps {
setSelectedKeys: (selectedKeys: Key[]) => void;
selectedKeys: Key[];
confirm: (param?: FilterConfirmProps) => void;
clearFilters?: () => void;
clearFilters?: (param?: FilterResetProps) => void;
filters?: ColumnFilterItem[];
visible: boolean;
column: ColumnType;
}
interface FilterConfirmProps {
closeDropdown: boolean;
}
interface FilterResetProps {
confirm?: boolean;
closeDropdown?: boolean;
}
```
## Note

@ -263,11 +263,20 @@ interface FilterDropdownProps {
setSelectedKeys: (selectedKeys: Key[]) => void;
selectedKeys: Key[];
confirm: (param?: FilterConfirmProps) => void;
clearFilters?: () => void;
clearFilters?: (param?: FilterResetProps) => void;
filters?: ColumnFilterItem[];
visible: boolean;
column: ColumnType;
}
interface FilterConfirmProps {
closeDropdown: boolean;
}
interface FilterResetProps {
confirm?: boolean;
closeDropdown?: boolean;
}
```
## 注意

@ -78,13 +78,17 @@ export type FilterSearchType<RecordType = Record<string, any>> =
export interface FilterConfirmProps {
closeDropdown: boolean;
}
export interface FilterResetProps {
confirm?: boolean;
closeDropdown?: boolean;
}
export interface FilterDropdownProps<RecordType> {
prefixCls: string;
setSelectedKeys: (selectedKeys: Key[]) => void;
selectedKeys: Key[];
confirm: (param?: FilterConfirmProps) => void;
clearFilters?: () => void;
clearFilters?: (param?: FilterResetProps) => void;
filters?: ColumnFilterItem[];
/** Only close filterDropdown */
close: () => void;

Loading…
Cancel
Save