freeCodeCamp / classroom

BSD 3-Clause "New" or "Revised" License
145 stars 119 forks source link

fix(admin): DataTable replaced with useTable #478

Open Komal914 opened 10 months ago

Komal914 commented 10 months ago

Checklist:

Closes #467

Screenshot 2023-09-11 at 10 16 51 PM

In the past DataTable has caused issues so admin has been updated with useTable. Since the UI is slightly different, the snapshot needed to be updated for adminTable.

Komal914 commented 5 months ago

Thanks for taking a look @ngillux , there is a way to implement the footer with the new library. I can research and try an implementation. I will say 'React Table' is a bit confusing so I was curious to see if there a better library. Additionally, the library also released an update to version 8. So we probably should use the latest version.

Also, seems that we are using the previous library with 'DataTable', in other parts of the application -> "/components/dashtable.js". Since we are replacing this library inside this PR, it would make sense to also update this section.

i think it might be valuable for us to create a re-usable component which we can import in to use as the base table. Or consider switching to a new library for tables, as 'React Table' version 8 seems to be all in typescript. I found this new library which seems to be very well documented.