-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 reactable with DataTable from superset-ui in QueryTable #10981
Conversation
@rusackas Would you mind taking a look? |
|
||
describe('QueryTable', () => { | ||
// hack for mocking hook that implements sticky behaviour of DataTable | ||
jest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rusackas This was needed because sticky DataTable uses useLayoutEffect
under the hood and that caused enzyme not to render the component properly. If you have a better idea how to solve it I'll be happy to try it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! I've been wanting to move DataTable
to a standalone package, too, so it doesn't feel weird to import things from a plugin in the core UI.
But I think current approach is good. We can always come back and refactor once someone finds time to do the extraction.
…le (apache#10981)" This reverts commit e93d92e.
…he#10981) * Replace reactable with DataTable from superset-ui in QueryTable * Fix tests * Fix pagination * Fix tests
…ryTable (apache#10981)" (apache#11125) This reverts commit e93d92e.
SUMMARY
The goal is to replace all uses of
reactable-arc
library with DataTable from superset-ui (which usesreact-table
under the hood) and keep the UI/UX mostly unchanged. The reason for that is thatreactable-arc
has been unsupported for 2 years now, uses deprecated lifecycle methods and is incompatible with Typescript.This PR replaces
reactable-arc
in QueryTable componentBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
As you can see, there's an additional field where we can change the items per page param. Currently
DataTable
doesn't support not showing this field.TEST PLAN
ADDITIONAL INFORMATION