|
1 | 1 | import { reactive, defineComponent, nextTick, computed, watch } from 'vue'; |
2 | 2 | import FilterFilled from '@ant-design/icons-vue/FilterFilled'; |
3 | 3 | import Menu, { SubMenu, MenuItem } from '../menu'; |
4 | | -import closest from '../_util/dom-closest'; |
5 | 4 | import classNames from '../_util/classNames'; |
6 | 5 | import shallowequal from '../_util/shallowequal'; |
7 | 6 | import Dropdown from '../dropdown'; |
8 | 7 | import Checkbox from '../checkbox'; |
9 | 8 | import Radio from '../radio'; |
10 | 9 | import FilterDropdownMenuWrapper from './FilterDropdownMenuWrapper'; |
11 | 10 | import { FilterMenuProps } from './interface'; |
12 | | -import { isValidElement, findDOMNode } from '../_util/props-util'; |
| 11 | +import { isValidElement } from '../_util/props-util'; |
13 | 12 | import initDefaultProps from '../_util/props-util/initDefaultProps'; |
14 | 13 | import { cloneElement } from '../_util/vnode'; |
15 | 14 | import BaseMixin2 from '../_util/BaseMixin2'; |
@@ -67,33 +66,9 @@ export default defineComponent({ |
67 | 66 | // ); |
68 | 67 | return state; |
69 | 68 | }, |
70 | | - |
71 | | - mounted() { |
72 | | - const { column } = this; |
73 | | - nextTick(() => { |
74 | | - this.setNeverShown(column); |
75 | | - }); |
76 | | - }, |
77 | | - updated() { |
78 | | - const { column } = this; |
79 | | - nextTick(() => { |
80 | | - this.setNeverShown(column); |
81 | | - }); |
82 | | - }, |
83 | 69 | methods: { |
84 | 70 | getDropdownVisible() { |
85 | | - return this.neverShown ? false : this.sVisible; |
86 | | - }, |
87 | | - setNeverShown(column) { |
88 | | - const rootNode = findDOMNode(this); |
89 | | - const filterBelongToScrollBody = !!closest(rootNode, `.ant-table-scroll`); |
90 | | - if (filterBelongToScrollBody) { |
91 | | - // When fixed column have filters, there will be two dropdown menus |
92 | | - // Filter dropdown menu inside scroll body should never be shown |
93 | | - // To fix https://github.com/ant-design/ant-design/issues/5010 and |
94 | | - // https://github.com/ant-design/ant-design/issues/7909 |
95 | | - this.neverShown = !!column.fixed; |
96 | | - } |
| 71 | + return !!this.sVisible; |
97 | 72 | }, |
98 | 73 |
|
99 | 74 | setSelectedKeys({ selectedKeys }) { |
|
0 commit comments