mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +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) {
|
||||
const { column } = nextProps;
|
||||
let newState;
|
||||
let newState: {
|
||||
selectedKeys?: string[];
|
||||
visible?: boolean;
|
||||
} = {};
|
||||
if ('selectedKeys' in nextProps) {
|
||||
newState = newState || {};
|
||||
newState.selectedKeys = nextProps.selectedKeys;
|
||||
}
|
||||
if ('filterDropdownVisible' in column) {
|
||||
newState = newState || {};
|
||||
newState.visible = column.filterDropdownVisible;
|
||||
}
|
||||
if (newState) {
|
||||
if (Object.keys(newState).length > 0) {
|
||||
this.setState(newState);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user