当我尝试以下操作时,列出现错误:
{
title: "Gruppe",
dataIndex: 'group',
filters: [
this.state.dropdownItems.map((item) => ({
text: item.group,
value: item.group
})
)],
onFilter: (value, record) => record.TransactionType.includes(value),
},
错误:*TS2322 (TS) 类型“({ title: string; dataIndex: string; key: string; width: number; align: "center"; sorter: (a: any, b: any) => number; filters?: undefined; onFilter?: undefined; render?: undefined; } | { title: string; ... 7 more ...; render?: undefined; } | { ...; } | { ...; } | { ...; }) []”不能赋值给类型“ColumnsType”。类型“{ title: string; dataIndex: string; key: string; width: number; align: "center"; sorter: (a: any, b: any) => number; filters?:undefined; onFilter?:undefined; render?:undefined; } | { title: string; ... 7 more ...; render?:undefined; } | { ...; } | { ...; } | { ...; }”不能分配给类型“ColumnGroupType | ColumnType”。类型“{ title: string; dataIndex: string; width: number; align: "center"; filters: { text: string; value: string; }[][]; onFilter: (value: any, record: any) => any; key?:undefined; sorter?:undefined; render?:undefined; }”不可分配给类型“ColumnGroupType | ColumnType”。类型“{ title: string; dataIndex: string; width: number; align: "center"; filters: { text: string; value: string; }[][]; onFilter: (value: any, record: any) => any; key?:undefined; sorter?:undefined; render?:undefined; }”不可分配给类型“ColumnType”。属性“filters”的类型不兼容。类型“{text:string;value:string;}[][]”无法分配给类型“ColumnFilterItem []”。类型“{text:string;value:string;} []”缺少类型“ColumnFilterItem”的以下属性:文本,值 *