材质 UI 自动完成 groupBy 标题的自定义 CSS

时间:2021-06-24 04:20:49

标签: material-ui

我从 AJAX + JSON 加载了 Material UI 自动完成

我想为 groupBy 的 Title 自定义 CSS 背景和颜色

enter image description here

到目前为止选项的背景都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>
        
        )
      }}

0 个答案:

没有答案