|
|
@ -29,14 +29,15 @@ const Select: FC<SelectProps> = (selectProps) => { |
|
|
|
onClearIndicatorClick = SELECT_DEFAULT_PROPS.onClearIndicatorClick, |
|
|
|
onClearIndicatorClick = SELECT_DEFAULT_PROPS.onClearIndicatorClick, |
|
|
|
...muiSelectProps |
|
|
|
...muiSelectProps |
|
|
|
} = selectProps; |
|
|
|
} = selectProps; |
|
|
|
const { children, sx } = muiSelectProps; |
|
|
|
const { children, sx, value } = muiSelectProps; |
|
|
|
const clearIndicator: JSX.Element | undefined = onClearIndicatorClick ? ( |
|
|
|
const clearIndicator: JSX.Element | undefined = |
|
|
|
<MUIInputAdornment position="end"> |
|
|
|
String(value).length > 0 && onClearIndicatorClick ? ( |
|
|
|
<MUIIconButton onClick={onClearIndicatorClick}> |
|
|
|
<MUIInputAdornment position="end"> |
|
|
|
<CloseIcon fontSize="small" /> |
|
|
|
<MUIIconButton onClick={onClearIndicatorClick}> |
|
|
|
</MUIIconButton> |
|
|
|
<CloseIcon fontSize="small" /> |
|
|
|
</MUIInputAdornment> |
|
|
|
</MUIIconButton> |
|
|
|
) : undefined; |
|
|
|
</MUIInputAdornment> |
|
|
|
|
|
|
|
) : undefined; |
|
|
|
|
|
|
|
|
|
|
|
const combinedSx = { |
|
|
|
const combinedSx = { |
|
|
|
[`& .${muiSelectClasses.icon}`]: { |
|
|
|
[`& .${muiSelectClasses.icon}`]: { |
|
|
|