GuillaumeJasmin/react-table-hoc-fixed-columns

Type compatibility issues with ColumnFixed, Column type from react-table and Typescript

jfarribillaga opened this issue · 0 comments

Hello,

I am using react-table and Typescript and using the useTable hook.

Unfortunately, I have an issue with compatibility on Column and Columnfixed (when passing the columns.

Anyone with the same issue?

Any example in codesanbox using typescript?

Thanks,

  Type 'Column<SearchResult>' is not assignable to type 'ColumnFixed<any>'.
    Type 'ColumnInterface<SearchResult> & ColumnGroupInterface<SearchResult> & { Header: string; } & { accessor?: Accessor<...> | undefined; }' is not assignable to type 'ColumnFixed<any>'.
      Types of property 'columns' are incompatible.
        Type 'Column<SearchResult>[]' is not assignable to type 'ColumnFixed<any>[]'.
          Type 'Column<SearchResult>' is not assignable to type 'ColumnFixed<any>'.
            Type 'ColumnInterface<SearchResult> & ColumnInterfaceBasedOnValue<SearchResult, any> & { Header: string; } & { ...; }' has no properties in common with type 'ColumnFixed<any>'.ts(2322)
index.d.ts(10, 3): The expected type comes from property 'columns' which is declared here on type 'IntrinsicAttributes & Partial<TablePropsColumnFixed<any, any>> & { children?: ReactNode; }'```