redux-form-material-ui
redux-form-material-ui copied to clipboard
Select not scrolling
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.
I have same issue. Nobody solved this issue?
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...