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

[Select] Apply disabled color to the icon #20287

Merged
merged 4 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/material-ui-lab/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export const styles = (theme) => ({
clearIndicator: {
marginRight: -2,
padding: 4,
color: theme.palette.action.active,
visibility: 'hidden',
},
/* Styles applied to the clear indicator if the input is dirty. */
Expand All @@ -143,7 +142,6 @@ export const styles = (theme) => ({
popupIndicator: {
padding: 2,
marginRight: -2,
color: theme.palette.action.active,
},
/* Styles applied to the popup indicator if the popup is open. */
popupIndicatorOpen: {
Expand Down
5 changes: 4 additions & 1 deletion packages/material-ui/src/NativeSelect/NativeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ export const styles = (theme) => ({
position: 'absolute',
right: 0,
top: 'calc(50% - 12px)', // Center vertically
color: theme.palette.action.active,
pointerEvents: 'none', // Don't block pointer events on the select under the icon.
color: theme.palette.action.active,
'&$disabled': {
color: theme.palette.action.disabled,
},
},
/* Styles applied to the icon component if the popup is open. */
iconOpen: {
Expand Down
6 changes: 5 additions & 1 deletion packages/material-ui/src/NativeSelect/NativeSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ const NativeSelectInput = React.forwardRef(function NativeSelectInput(props, ref
{...other}
/>
{props.multiple ? null : (
<IconComponent className={clsx(classes.icon, classes[`icon${capitalize(variant)}`])} />
<IconComponent
className={clsx(classes.icon, classes[`icon${capitalize(variant)}`], {
[classes.disabled]: disabled,
})}
/>
)}
</React.Fragment>
);
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/Select/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ const SelectInput = React.forwardRef(function SelectInput(props, ref) {
<IconComponent
className={clsx(classes.icon, classes[`icon${capitalize(variant)}`], {
[classes.iconOpen]: open,
[classes.disabled]: disabled,
})}
/>
<Menu
Expand Down