mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(search): 🐛 implement new close dropdown param
ref https://github.com/ant-design/ant-design/pull/28688
This commit is contained in:
parent
2ddef8201d
commit
3ab91c4c52
1 changed files with 6 additions and 3 deletions
|
|
@ -1,7 +1,10 @@
|
|||
import { SearchOutlined } from "@ant-design/icons";
|
||||
import { Button, Input } from "antd";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { FilterDropdownProps } from "antd/lib/table/interface";
|
||||
import {
|
||||
FilterConfirmProps,
|
||||
FilterDropdownProps,
|
||||
} from "antd/lib/table/interface";
|
||||
|
||||
interface FilterPropsState<T> {
|
||||
filterDropdown?:
|
||||
|
|
@ -18,8 +21,8 @@ export const useSearchColumnFilter = <T extends {}>(dataIndex: string) => {
|
|||
onFilter: undefined,
|
||||
});
|
||||
useEffect(() => {
|
||||
const handleSearch = (confirm?: () => void) => {
|
||||
confirm && confirm();
|
||||
const handleSearch = (confirm?: (param: FilterConfirmProps) => void) => {
|
||||
confirm && confirm({ closeDropdown: true });
|
||||
};
|
||||
const handleReset = (clearFilters?: (selectedKeys: string[]) => void) => {
|
||||
clearFilters && clearFilters([]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue