Skip to content

Commit

Permalink
fix(search): 🐛 implement new close dropdown param
Browse files Browse the repository at this point in the history
  • Loading branch information
collinbarrett committed Jan 26, 2021
1 parent 2ddef82 commit 3ab91c4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web/src/hooks/useSearchColumnFilter.tsx
Original file line number Diff line number Diff line change
@@ -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?:
Expand All @@ -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([]);
Expand Down

0 comments on commit 3ab91c4

Please sign in to comment.