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

Replace react-bootstrap-table2 with a custom Boostrap table implementation #726

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

loic-brtd
Copy link

@loic-brtd loic-brtd commented Feb 25, 2024

Hi 😃 I noticed that the frontend of CastleMock wouldn't build anymore because the following packages haven't been updated for 4 years and are not compatible with React 18 :

    "react-bootstrap-table-next": "^4.0.3",
    "react-bootstrap-table2-filter": "^1.1.6",
    "react-bootstrap-table2-paginator": "^2.0.4",
    "react-bootstrap-table2-toolkit": "^2.1.3",

As an exercice, I took a bit of time to drop theses dependencies and replace them with a custom DataTable component I built. I made it work with all the existing table configuration code and tried to make it look and behave the same way it did before. So it's almost a one-to-one replacement.

image

I still have some BootstrapTable components left to replace and test (not the most difficult part). Please let me know if you are interested in merging this pull request once it is complete.

@karldahlgren
Copy link
Collaborator

Hi @loic-brtd
I haven't tried your changes yet, but I think this sounds amazing! In fact, replacing the current table has been on my to-do list ever since they stopped maintaining it. The bootstrap react table has been one of the main reasons for why Castle Mock hasn't been updated to the latest React version. Really looking forward into looking more into this. I will deep dive into your changes during next week.

Also, there are some of the table features that are more nice-to-have, rather than need-to-have. From my point of view, the table only needs to be easy to work with and sortable.

Great work!

@loic-brtd loic-brtd marked this pull request as ready for review March 6, 2024 23:26
@karldahlgren
Copy link
Collaborator

Hi!
I just noticed that this is ready for review. I will take a look at it as soon as I can.

Thank you once again for your contribution. Really looking forward to reviewing this.

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

Successfully merging this pull request may close these issues.

None yet

2 participants