reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

Adding `menuProps` or `menuClassName` to better customize the menu style. #300

Closed sergiop closed 6 years ago

sergiop commented 6 years ago

I'm using JSS instead of inline styles, and without accessing to className prop, I can't integrate JSS object in menu.

Currently I can do it with input:

inputProps={{
  className: classes.input, // JSS style class name
}}

And with wrapper:

inputProps={{
  className: classes.wrapper, // JSS style class name
}}

But there is no possibility to access to menu element to manage className prop.

CMTegner commented 6 years ago

Hi Sergio! You can use renderMenu to achieve this. We're looking to reduce the amount of element-specific props in favour of render callbacks, so we won't be adding a new prop for this at the moment.