mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
Read initial visible state from column.filterDropdownVisible if it's available. (#4182)
fix #4162
This commit is contained in:
parent
e1efc29150
commit
66f7b050eb
@ -30,10 +30,13 @@ export default class FilterMenu extends React.Component<FilterMenuProps, any> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const visible = ('filterDropdownVisible' in props.column) ?
|
||||
props.column.filterDropdownVisible : false;
|
||||
|
||||
this.state = {
|
||||
selectedKeys: props.selectedKeys,
|
||||
keyPathOfSelectedItem: {}, // 记录所有有选中子菜单的祖先菜单
|
||||
visible: false,
|
||||
visible,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ describe('Table.filter', () => {
|
||||
expect(renderToJson(dropdownWrapper)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
xit('can be controlled by filterDropdownVisible', () => {
|
||||
it('can be controlled by filterDropdownVisible', () => {
|
||||
const wrapper = mount(createTable({
|
||||
columns: [{
|
||||
...column,
|
||||
|
Loading…
Reference in New Issue
Block a user