imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

React Bootstrap 2: update dependencies and prepare for new major version #100

Closed imballinst closed 2 years ago

imballinst commented 2 years ago

Since this contains breaking changes from Bootstrap 4 to Bootstrap 5, this is going to be a new major version.

hmmm, yes, I can see that's an issue because React Bootstrap 2 has a completely different API than React Bootstrap 1 (because the former uses Bootstrap 5 whereas the former uses Bootstrap 4).

I think we need to update the whole library if we want to make it compatible with Bootstrap 5. Let me see what I can do near this weekend. I'll log an issue. So the tasks list would be somewhat close to:

  1. Lock all dependencies for the better
  2. Update react-bootstrap to v2
  3. Update the parts of the codebase that imports react-bootstrap and adjust accordingly to the new API

Originally posted by @imballinst in https://github.com/imballinst/react-bs-datatable/issues/98#issuecomment-1022770927

imballinst commented 2 years ago

@ahmetunal I have created a new branch for the next version of this library that supports React Bootstrap v2 and Bootstrap v5. Could you take a look? I have written some of the new stuff (so far) and the breaking changes: https://github.com/imballinst/react-bs-datatable/tree/v3-prep

I have also prepared a sandbox for the demo: https://codesandbox.io/s/react-bs-datatable-3-zq7xe. If you want to install it in your local, you can do it with yarn add react-bs-datatable@next and see if it installs the 3.0.0-alpha.6 version, which is used in the sandbox.

Looking forward for your feedback. Thanks!

ahmetunal commented 2 years ago

I will take a look today and let you know, thanks

ahmetunal commented 2 years ago

I can confirm that it installs 3.0.0-alpha.6, but I am getting bunch of Module bot found errors: ERROR in ./node_modules/react-bs-datatable/lib/esm/Filter.js 2:0-52 Module not found: Error: Can't resolve 'react-bootstrap/InputGroup' in 'G:\peorya\test\react-tests\node_modules\react-bs-datatable\lib\esm' (and goes on for Form, Button, Row',Table,Col,ButtonGroup,fontawesome`

imballinst commented 2 years ago

@ahmetunal Thanks for testing! Is it reproducible in Codesandbox?

Because in Codesandbox it works fine, and so does the Next.js example here: https://github.com/imballinst/react-bs-datatable/tree/v3-prep/examples/next (the screenshot is below, mostly unstyled):

image

ahmetunal commented 2 years ago

nevermind, it was on me. Works great

imballinst commented 2 years ago

Thanks for confirming @ahmetunal!

I'll work on some more bits on the v3, then I'll release the official version. As of this moment, I have made some more small optimizations with regards to the bundle size compared to the latest version in v2: https://bundlephobia.com/package/react-bs-datatable@3.0.0-alpha.6.

image

Currently I'm still refactoring and improving Developer Experience (DX), so I might trouble you a bit later to test its DX, if you don't mind :smile:

ahmetunal commented 2 years ago

Sure, anytime :thumbsup:

imballinst commented 2 years ago

Closing this via https://github.com/imballinst/react-bs-datatable/pull/111.