fix: type error of filterDropdown

This commit is contained in:
Wei Zhu 2018-09-30 16:11:25 +08:00
parent ee84f4ce0a
commit fe677e2966

View File

@ -194,8 +194,8 @@ export default class FilterMenu<T> extends React.Component<FilterMenuProps<T>, F
[`${dropdownPrefixCls}-menu-without-submenu`]: !this.hasSubMenu(),
});
let { filterDropdown } = column;
if (filterDropdown && typeof filterDropdown === 'function') {
filterDropdown = filterDropdown({
if (typeof filterDropdown === 'function') {
filterDropdown = (filterDropdown as Function)({
prefixCls: `${dropdownPrefixCls}-custom`,
setSelectedKeys: (selectedKeys: Array<any>) => this.setSelectedKeys({ selectedKeys }),
selectedKeys: this.state.selectedKeys,