Open zhengyhn opened 4 years ago
"defaultExpandAll" property was not defined in typing/index.d.ts
<Table defaultExpandAll={true}/>
No overload matches this call. Overload 1 of 2, '(props: Readonly<TableProps>): Table', gave the following error. Type '{ style: { width: string; }; columns: ({ type: string; expandPannel: (data: any) => Element; label?: undefined; prop?: undefined; width?: undefined; } | { label: string; prop: string; width: number; type?: undefined; expandPannel?: undefined; } | { ...; })[]; data: { ...; }[]; border: false; defaultExpandAll: boolea...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. Property 'defaultExpandAll' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. Overload 2 of 2, '(props: TableProps, context?: any): Table', gave the following error. Type '{ style: { width: string; }; columns: ({ type: string; expandPannel: (data: any) => Element; label?: undefined; prop?: undefined; width?: undefined; } | { label: string; prop: string; width: number; type?: undefined; expandPannel?: undefined; } | { ...; })[]; data: { ...; }[]; border: false; defaultExpandAll: boolea...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. Property 'defaultExpandAll' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. TS2769
Add defaultExpandAll to the interface TableProps.
interface TableProps extends ElementReactLibs.ComponentProps<{}> { columns?: TableColumn[] data?: Object[] height?: number stripe?: boolean border?: boolean fit?: boolean rowClassName?(row?, index?): void style?: Object highlightCurrentRow?: boolean // defaultExpandAll?: boolean onCurrentChange?(): void onSelectAll?(): void onSelectChange?(): void }
Description
"defaultExpandAll" property was not defined in typing/index.d.ts
Reproduce Steps
<Table defaultExpandAll={true}/>
Error Trace (if possible)
Solution
Add defaultExpandAll to the interface TableProps.
Additional Information