-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🌱 Refactor
ComposableTableWithControls
to use render-props pattern …
…for more flexibility, apply changes to Migration Waves and Jira Trackers tables (#792) In preparation for the rest of the dynamic reports work, this PR takes the table abstraction introduced in #598 for migration waves and refactors it to be even more composable. The goal is that all JSX used to render the Tr and Td elements is passed in from the consumer, with functions made available via the render-props pattern for abstracting repetitive props out into the component. This way the consumer can benefit from a simplified way to render tables without losing the flexibility to pass any props necessary on any row/cell. There are some remaining questions to be answered about this abstraction, to be addressed in followup PRs. Some of these are covered in TODO comments here, in particular how to handle composable access to the props of the Thead/Tr elements without too much repetition, and how to handle non-compound-expandable rows and sorting controls. These will be addressed as part of adding the Issues table for dynamic reports. --------- Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu> Co-authored-by: Ian Bolton <ibolton@redhat.com>
- Loading branch information
1 parent
504e898
commit 63dceb5
Showing
5 changed files
with
391 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.