Skip to content
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

Merged
merged 10 commits into from
Sep 8, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,14 @@ function GridColumnsPropEditor({
<DialogTitle>Edit columns</DialogTitle>
<DialogContent>
<Tooltip title="Recreate columns">
<IconButton
aria-label="Recreate columns"
onClick={handleRecreateColumns}
disabled={!hasColumnSuggestions}
>
<RefreshIcon />
</IconButton>
<span>
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

@apedroferreira apedroferreira Sep 7, 2022

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

<IconButton onClick={handleRecreateColumns} disabled={!hasColumnSuggestions}>
<RefreshIcon />
</IconButton>
</span>
</Tooltip>
<Tooltip title="Add column">
<IconButton aria-label="Add column" onClick={handleMenuClick} disabled={disabled}>
<IconButton onClick={handleMenuClick} disabled={disabled}>
<AddIcon />
</IconButton>
</Tooltip>
Expand Down
Loading