-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Allow recreating data grid columns from existing data #914
Conversation
Your Render PR Server URL is https://toolpad-pr-914.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cccbc8un6mprmh1icu80. |
@@ -176,6 +188,13 @@ function GridColumnsPropEditor({ | |||
<React.Fragment> | |||
<DialogTitle>Edit columns</DialogTitle> | |||
<DialogContent> | |||
<IconButton | |||
aria-label="Recreate columns" |
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.
We should probably add a tooltip instead.
@prakhargupta1 @gerdadesign nominating this component as well for a redesign. Perhaps we could even put this inline in the inspector, instead of in a dialog?
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.
good idea, i'll add
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.
I've added tooltips to the "Recreate columns" and the "Add column" buttons
</IconButton> | ||
<Tooltip title="Recreate columns"> | ||
<IconButton | ||
aria-label="Recreate columns" |
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.
Tooltip should add the label
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.
cool i didn't know, i've removed the unnecessary props + added a span so that the tooltip shows when the "recreate columns" button is disabled (as recommended by the MUI console warnings)
> | ||
<RefreshIcon /> | ||
</IconButton> | ||
<span> |
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.
this prevents it from passing the aria label to the button, right?
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.
it's passed to the span, actually that might not be ok good point
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.
i added describeChild
to the tooltip and aria-label
in the button, seems like the right way to do it
Allow for recreating columns in Data Grid elements, from existing data.
Replaces all columns with the inferred columns when the button is pressed.
Screen.Recording.2022-09-07.at.16.14.37.mov