redux-form-material-ui icon indicating copy to clipboard operation
redux-form-material-ui copied to clipboard

Select not scrolling

Open mingca opened this issue 6 years ago • 2 comments

import { Select } from 'redux-form-material-ui';  

  <FormControl margin="normal" key="state">
      <InputLabel htmlFor="state">State</InputLabel>
      <Field
        name="state"
        component={Select}
        validate={required}
      >
        {
          states.map(item => (
            <MenuItem key={item.abbreviation} value={item.abbreviation}>{item.name}</MenuItem>
          ))
        }
      </Field>
    </FormControl>

The list has 50 US states so it's long and there's a scrollview shown on the right of select modal.

The issue: It doesn't scrollable by scroll button(middle button). Btw I can scroll it by moving scrollbar but doesn't allow scrolling by scroll button.

mingca avatar Apr 16 '18 03:04 mingca

I have same issue. Nobody solved this issue?

victoria100 avatar Jul 23 '18 00:07 victoria100

I have maybe found a solution, the only workaround to fix this is to add custom css to your Select elements, you can target the element easily, thanks to redux-form adding an id => menu-${nameOfYourField}, and the component we need to target is the div with a role=["document"], so you can do something like this

#menu-${yourField} div[role="document"]{
    transform: translate3d(0, 0, 0) !important;
}

This seems to work for me, but I think the real issue is that this library is not up to date with the latest version...

remy-poirier avatar Aug 28 '18 12:08 remy-poirier