mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 13:08:41 +08:00
fix ts error
This commit is contained in:
parent
a6e09ccfd0
commit
cc1f1be8bd
@ -39,16 +39,17 @@ export default class FilterMenu extends React.Component<FilterMenuProps, any> {
|
|||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { column } = nextProps;
|
const { column } = nextProps;
|
||||||
let newState;
|
let newState: {
|
||||||
|
selectedKeys?: string[];
|
||||||
|
visible?: boolean;
|
||||||
|
} = {};
|
||||||
if ('selectedKeys' in nextProps) {
|
if ('selectedKeys' in nextProps) {
|
||||||
newState = newState || {};
|
|
||||||
newState.selectedKeys = nextProps.selectedKeys;
|
newState.selectedKeys = nextProps.selectedKeys;
|
||||||
}
|
}
|
||||||
if ('filterDropdownVisible' in column) {
|
if ('filterDropdownVisible' in column) {
|
||||||
newState = newState || {};
|
|
||||||
newState.visible = column.filterDropdownVisible;
|
newState.visible = column.filterDropdownVisible;
|
||||||
}
|
}
|
||||||
if (newState) {
|
if (Object.keys(newState).length > 0) {
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user