-
Notifications
You must be signed in to change notification settings - Fork 841
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] Add extra left prepend position to the additionalControls
API
#5394
[EuiDataGrid] Add extra left prepend position to the additionalControls
API
#5394
Conversation
additionalControls
APIadditionalControls
API
Preview documentation changes for this PR: https://eui.elastic.co/pr_5394/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5394/ |
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.
Quick clarification from the docs:
Use the
toolbarVisibility.additionalControls
prop to pass more buttons to the toolbar. It will respect thetoolbarVisibility={false}
setting and hide when appropriate.
Would that even be possible? Since additionalControls
is nested within toolbarVisibility
you cant have toolbarVisibility = {false & additionalControls: {}}
.
The component work LGTM, my comments mostly revolve around the docs:
I'd change the sentence:
Passing a single node to
additionalControls
will default to being appended to the left side of the toolbar.
to:
Passing a single node to
additionalControls
will default to being placed in theleft.append
position of the toolbar.
Edit: I didn't read the 'appended' portion of the sentence. I've adjusted my suggestion.
It also might be helpful to add into the window.alert
which configuration was used to place that control.
Yeah, it does seem like a no brainer since there's no way to define |
Feedback should be addressed in latest commit! |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5394/ |
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.
👍 Design and design code LGTM. Checked in Safari and Firefox too.
72fdf3f
into
elastic:feat/datagrid/toolbar-reorg-and-row-height-switcher
…5415) * [EuiDataGrid] Toolbar UI layout reorganization (#5334) * [EuiDataGrid] Add extra left prepend position to the `additionalControls` API (#5394) * [EuiDataGrid] Add rowHeightSwitcher logic + API change (#5372) * [EuiDataGrid] Add `onChange` callbacks for display selector changes (#5424) * [EuiDataGrid] Row height switcher should override `rowHeights` + add reset button (#5428) * [EuiDataGrid] improve height calculation (#5447) Co-authored-by: Caroline Horn <[email protected]> Co-authored-by: Chandler Prall <[email protected]>
Summary
Per Caroline's comment here, the Discover team requires the being able to put additional controls to the left of our columns/sort selectors:
This PR splits up the
left
position key an object allowingleft.append
andleft.prepend
. Single nodes passed in instead of an object of positions will default toleft.append
.New documentation example:
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Checked Code Sandbox works for any docs examplesThis is a breaking API change, but is being merged into a feature branch.
- [ ] Checked for accessibility including keyboard-only and screenreader modes