我从 AJAX + JSON 加载了 Material UI 自动完成
我想为 groupBy 的 Title 自定义 CSS 背景和颜色
到目前为止选项的背景都OK
autoHighlight={true}
PaperComponent={({ children }) => (
<Paper style={{ background: "#EBEBEB" }}>{children}</Paper>
)}
renderInput={params => (
<TextField
{...params}
label="Country/District"
variant="outlined"
InputProps={{
...params.InputProps,
endAdornment: (
<React.Fragment>
{this.state.loadingCity ? (
<CircularProgress color="inherit" size={20} />
) : null}
{params.InputProps.endAdornment}
<InputAdornment position="end">
<SearchIcon />
</InputAdornment>
</React.Fragment>
)
}}