From aa2f08e204c35da3b9d2836117f6a115aaea4d8f Mon Sep 17 00:00:00 2001 From: Ivan Frescas Date: Tue, 10 Dec 2019 16:50:32 -0700 Subject: [PATCH 1/2] [Select] Fix incorrect auto-sizing of Native select. --- .../material-ui/src/NativeSelect/NativeSelect.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/material-ui/src/NativeSelect/NativeSelect.js b/packages/material-ui/src/NativeSelect/NativeSelect.js index 9da6ff1ae34cce..b66366f66d4bab 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelect.js +++ b/packages/material-ui/src/NativeSelect/NativeSelect.js @@ -39,12 +39,22 @@ export const styles = theme => ({ '&:not([multiple]) option, &:not([multiple]) optgroup': { backgroundColor: theme.palette.background.paper, }, + '&&': { + paddingRight: 24, + }, }, /* Styles applied to the select component if `variant="filled"`. */ - filled: {}, + filled: { + '&&': { + paddingRight: 32, + } + }, /* Styles applied to the select component if `variant="outlined"`. */ outlined: { borderRadius: theme.shape.borderRadius, + '&&': { + paddingRight: 32, + }, }, /* Styles applied to the select component `selectMenu` class. */ selectMenu: { @@ -52,9 +62,6 @@ export const styles = theme => ({ textOverflow: 'ellipsis', whiteSpace: 'nowrap', overflow: 'hidden', - '&&': { - paddingRight: 24, - }, }, /* Pseudo-class applied to the select component `disabled` class. */ disabled: {}, From 3485a377d50a5588707b567125b9bcaca469ebd2 Mon Sep 17 00:00:00 2001 From: Ivan Frescas Date: Tue, 10 Dec 2019 20:01:38 -0700 Subject: [PATCH 2/2] add missing comma --- packages/material-ui/src/NativeSelect/NativeSelect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/NativeSelect/NativeSelect.js b/packages/material-ui/src/NativeSelect/NativeSelect.js index b66366f66d4bab..ce3274d84f741f 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelect.js +++ b/packages/material-ui/src/NativeSelect/NativeSelect.js @@ -47,7 +47,7 @@ export const styles = theme => ({ filled: { '&&': { paddingRight: 32, - } + }, }, /* Styles applied to the select component if `variant="outlined"`. */ outlined: {