-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiDataGrid] Replace popoverContents
API with renderCellPopover
#5640
[EuiDataGrid] Replace popoverContents
API with renderCellPopover
#5640
Conversation
- which replaces `popoverContents` and shares some common props with `renderCellValue`
+ improve prop documentation for renderCellValue, renderFooterCellValue
- in grid parent components
+ move to data_grid_cell_popover instead of popover_utils
- the popover needs this to conditionally change formatting based on schema, and renderCellValue seems like it could use this info as well
- which will allow custom renderers to pass back the default renderer if they only want custom rendering for certain popovers
- likely created by recent Cypress reference/ts PRs
+ remove props unrelated to schema + schema.js misc cleanup: - Remove unnecessary pagination state/props - there's only 5 items - Remove unnecessary conditional JSON - Make Star Wars vs Star Trek alternating, so sorting does more - Fix aria-label - (lint) fragment, export default
- remove popoverContents, add renderCellPopover - improve documentation on rendercellValue
- Fix several incorrect instances of `optional` vs `required` notation - move inMemory down to sorting/pagination instead of being at the top, since it's an optional prop - misc indentation/lint fixes
c19294a
to
7b52c07
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_5640/ |
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.
Left a couple thoughts, but I don't see any functional issues. This turned out really clean and straight-forward to use
- the component usage is cleaner than a render fn
3582b4a
to
72501ed
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_5640/ |
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.
Changes LGTM; pulled & tested locally and clicked around in the pr preview docs quite a bit too
Woohoo!!! |
Summary
closes #5310
This PR deprecates the old
popoverContents
API:With a new (optional)
renderCellPopover
API, that overrides our default popover rendering and allows users to completely customize cell popovers:Notes
renderCellPopover
prop, nothing should have regressed or changed from previous popover rendering/behavior.Screencap
Checklist
- [ ] Checked Code Sandbox works for any docs examples