From a9c88748548877695253a498bf6db361f3b626a6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 10 Jan 2019 13:52:12 +0800 Subject: [PATCH] :bug: Fix custom filterDropdown trigger sorter close #14238 --- .../__tests__/__snapshots__/Table.filter.test.js.snap | 4 +++- components/table/demo/custom-filter-panel.md | 11 +---------- components/table/filterDropdown.tsx | 4 +++- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap index 3e4fa0b2db..3480ec5a54 100644 --- a/components/table/__tests__/__snapshots__/Table.filter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.filter.test.js.snap @@ -31,7 +31,9 @@ exports[`Table.filter renders custom content correctly 1`] = `
-
+
diff --git a/components/table/demo/custom-filter-panel.md b/components/table/demo/custom-filter-panel.md index e63d07483a..a06c26628e 100644 --- a/components/table/demo/custom-filter-panel.md +++ b/components/table/demo/custom-filter-panel.md @@ -50,7 +50,7 @@ class App extends React.Component { filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, }) => ( -
+
{ this.searchInput = node; }} placeholder={`Search ${dataIndex}`} @@ -129,12 +129,3 @@ class App extends React.Component { ReactDOM.render(, mountNode); ```` - -````css -.custom-filter-dropdown { - padding: 8px; - border-radius: 4px; - background: #fff; - box-shadow: 0 2px 8px rgba(0, 0, 0, .15); -} -```` diff --git a/components/table/filterDropdown.tsx b/components/table/filterDropdown.tsx index 95e10fbcd8..67fea48b3a 100755 --- a/components/table/filterDropdown.tsx +++ b/components/table/filterDropdown.tsx @@ -247,7 +247,9 @@ export default class FilterMenu extends React.Component, F } const menus = filterDropdown ? ( - {filterDropdown} + + {filterDropdown} + ) : (