1

I have a react modal in which there is an color html input and other is react select. The react modal has overflow auto css properties.

Now, if I open color input it opens without triggering the overflow property of react modal. How to make react select follow the same as color input.

Color Input Color Input

React Select: React Select

Arsh Doda
  • 294
  • 4
  • 14
  • 1
    The colour input is controlled by the browser, the browser is making the decision that the colour input should not affect the layout of the containing modal. Using react-select gives you a whole bunch of divs styled to act like a select, as the browser assumes these are just divs (why wouldn't it) it also assumes they should affect the layout of the containing modal. To get around this your best bet would be to look at portals which would allow you to move the menu outside of the modal container: see example at https://react-select.com/advanced#portaling – Jacob Smit May 24 '21 at 04:09
  • Thank. It worked. – Arsh Doda May 27 '21 at 05:37

0 Answers0