harish-everest / react-phone-input-mui

Highly customizable phone :telephone_receiver: input component with auto formatting
MIT License
24 stars 13 forks source link

Dropdown and flags menu style error #9

Closed Stefifox closed 2 years ago

Stefifox commented 2 years ago

Using this component I'm noticing a problem with style, there is some code or import to fix this?

image image

My import:

import ReactPhoneInput from 'react-phone-input-material-ui';
import 'react-phone-input-material-ui/lib/style.css';

My Code:

<ReactPhoneInput
    name={name}
    disabled={!isEdit}
    value={value}
    component={TextField}
    country="it"
    inputProps={{ variant: 'filled', label, required }}
    fullWidth
    onChange={val => setValue(val)}
    onBlur={onBlur}
    // onKeyDown={e => e.key === 'Enter' && onBlur(e)}
    defaultErrorMessage={!!errorMessage && !isPristine}
    helperText={errorMessage && !isPristine ? errorMessage : null}
/>
harish-everest commented 2 years ago

You can try importing 'react-phone-input-material-ui/lib/plain.css' and if this fixes the styles. Else I will work on it or you can open a PR for a fix.

Stefifox commented 2 years ago

I've tried to import your style but this is the result image

harish-everest commented 2 years ago

Hi @Stefifox

You can use import 'react-phone-input-material-ui/lib/style.css';. Let me know if you still face styling issues.

Stefifox commented 2 years ago

Hi

After updating your library to 2.17.3 and importing css I still have the same problem.

without CSS image

with CSS image

harish-everest commented 2 years ago

@Stefifox I'm unable to replicate the styling issue. I tried with the same code as yours. Please provide a codesandbox demo so that I can debug this.

This is how it is looking for me.

Screenshot 2022-02-28 at 6 16 49 PM
harish-everest commented 2 years ago

Hi, @Stefifox closing this issue as we don't have any response on this.