mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +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