Giners / mui-places-autocomplete

Google Material Design (Material-UI) styled React component using Google Maps Places Autocomplete
MIT License
34 stars 26 forks source link

how to remove input underline #45

Open bilalclogix opened 5 years ago

bilalclogix commented 5 years ago

i want to remove underline from MUIPlacesAutocomplete . using prop disableUnderline: true, but its not working. can you please tell me the solution?

bilalclogix commented 5 years ago

anyone please ? its urgent

Giners commented 5 years ago

HI @bilalclogix,

Could you explain more how you are passing in the disableUnderline prop? I've been away from <MUIPlacesAutocomplete> and development for a while but will try to help.

bilalclogix commented 5 years ago

Hi @Giners here is my code please check <MUIPlacesAutocomplete name="companyAddress" onSuggestionSelected={onSuggestionSelected} renderTarget={() =>

} textFieldProps={{ name: 'companyAddress', placeholder: 'Enter your company address', disableUnderline: true, fullWidth: true, variant: 'standard', }} />

i just want to remove underline. i have attached screenshot as well please check. screenshot 4

bilalclogix commented 5 years ago

Hi Giners,

can you please tell me the solution its urgent for me to resolve this issue,

mtiziano commented 5 years ago

hi @bilalclogix I've found a workaround

    <MUIPlacesAutocomplete
      ...
      textFieldProps={{
        InputProps: { 
          className: classes.inputField 
        }
      }}
    />

and define styles with material-ui withStyles + createStyles

 const styles = (theme: Theme) =>
    ...
    inputField: {
      "&::before": { display: "none" },
      "&::after": { display: "none" }
    }

working fine