Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jfarribillaga opened this issue Apr 20, 2021 · 0 comments

Comments

@jfarribillaga
Copy link

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; }'```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant