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 aa671f7 commit 9c3c446
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/hooks/useSearchColumnFilter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 +18,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 9c3c446

Please sign in to comment.