element-react icon indicating copy to clipboard operation
element-react copied to clipboard

Table -> rowStyle does not exist

Open eakarpov opened this issue 5 years ago • 1 comments

Description

Property rowStyle in Table components does not exist

Reproduce Steps

  1. Create Table component
  2. Define rowStyle property

Error Trace (if possible)

Error:(10, 17) TS2769: No overload matches this call. Overload 1 of 2, '(props: Readonly<TableProps>): Table', gave the following error. Type '{ children: never[]; data: any; rowStyle: { height: string; }; defaultSort: any; className: string; height: number; emptyText: any; showHeader: any; columns: { prop: string; label: string; }[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. Property 'rowStyle' 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 '{ children: never[]; data: any; rowStyle: { height: string; }; defaultSort: any; className: string; height: number; emptyText: any; showHeader: any; columns: { prop: string; label: string; }[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'. Property 'rowStyle' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Table> & Readonly<TableProps> & Readonly<{ children?: ReactNode; }>'.

eakarpov avatar Dec 02 '19 08:12 eakarpov

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
  onCurrentChange?(): void
  onSelectAll?(): void
  onSelectChange?(): void
}

does not have the full list of claimed properties in docs!

eakarpov avatar Dec 02 '19 08:12 eakarpov