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

react-table-6 #58

Open
markwoon opened this issue Feb 3, 2020 · 6 comments
Open

react-table-6 #58

markwoon opened this issue Feb 3, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@markwoon
Copy link

markwoon commented Feb 3, 2020

Would it be possible to get this to work with react-table-6?

@GuillaumeJasmin
Copy link
Owner

It should be works. What is your issue ?

@markwoon
Copy link
Author

markwoon commented Feb 4, 2020

To be clear, I'm talking about the react-table-6 alias package.

When I switch from react-table to react-table-6 I get:

ERROR in ../node_modules/react-table-hoc-fixed-columns/lib/scrollEvent/index.js
Module not found: Error: Can't resolve 'react-table' in 'node_modules\react-table-hoc-fixed-columns\lib\scrollEvent'
 @ ../node_modules/react-table-hoc-fixed-columns/lib/scrollEvent/index.js 12:18-40
 @ ../node_modules/react-table-hoc-fixed-columns/lib/index.js
 @ ./scripts/components/tables/collection.js
 @ ./scripts/components/clinical_annotation/index.js
 @ ./scripts/routes/router.js
 @ ./scripts/conf/app.js
 @ ./scripts/browser.js

ERROR in ../node_modules/react-table-hoc-fixed-columns/lib/stickyPosition/index.js
Module not found: Error: Can't resolve 'react-table' in 'node_modules\react-table-hoc-fixed-columns\lib\stickyPosition'
 @ ../node_modules/react-table-hoc-fixed-columns/lib/stickyPosition/index.js 12:18-40
 @ ../node_modules/react-table-hoc-fixed-columns/lib/index.js
 @ ./scripts/components/tables/collection.js
 @ ./scripts/components/clinical_annotation/index.js
 @ ./scripts/routes/router.js
 @ ./scripts/conf/app.js
 @ ./scripts/browser.js

I'd like to use react-table-6 so that I can slowly migrate over to v7.

@GuillaumeJasmin
Copy link
Owner

Oh yes, sorry, I though I doesn't use react-table package, but I use it for ReactTableDefaults.
I will fix it soon and add a new parameter

@GuillaumeJasmin GuillaumeJasmin added the bug Something isn't working label Feb 5, 2020
@GuillaumeJasmin
Copy link
Owner

fixed in v2.3.0

@nathonius
Copy link

nathonius commented May 11, 2020

You also use react-table in the types, though I'm not sure how to resolve that exactly:

import { Column, TableProps } from 'react-table'

export interface ColumnFixed<D = any> extends Column<D> {
  fixed?: 'left' | 'right' | true;
  columns?: Array<ColumnFixed<D>>;
}

export interface TablePropsColumnFixed<D = any, ResolvedData = D> extends TableProps<D, ResolvedData> {
  columns?: Array<ColumnFixed<ResolvedData>>;
}

export function withFixedColumnsStickyPosition<D = any>(ReactTableComponent: React.ComponentType<Partial<TableProps<D>>>): React.ComponentType<Partial<TablePropsColumnFixed<D>>>
export function withFixedColumnsScrollEvent<D = any>(ReactTableComponent: React.ComponentType<Partial<TableProps<D>>>): React.ComponentType<Partial<TablePropsColumnFixed<D>>>
export default function withFixedColumns<D = any>(ReactTableComponent: React.ComponentType<Partial<TableProps<D>>>): React.ComponentType<Partial<TablePropsColumnFixed<D>>>

My solution right now is to just create a duplicate of this file with -6 added to the import.

@GuillaumeJasmin
Copy link
Owner

@OfficerHalf thanks ! I need to find a better implementation. Maybe a new major release with react-table-6 peer dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants