Forumpy
Forumpy

Reputation: 335

react-select dropdown not visible

I'm using react-select to create a dropdown for an open-source application which uses React/Redux and Electron. I'm using the bog-standard example code provided by react-select for this. However, when running, while the select box shows, clicking it seemingly does nothing. The dropdown that's meant to appear does not. When inspecting the HTML sources, it shows that when it's clicked, something does appear in the HTML, but this isn't visible in the app.

This is quite a large application and I don't know how much value there is in posting snippets of code; this one file alone is 500LoC. Does anyone have any ideas why this might be happening though?

Upvotes: 0

Views: 3436

Answers (1)

Forumpy
Forumpy

Reputation: 335

The problem was the "overflow" option of the CSS was set to "hidden" by default. Setting this to "visible" in the CSS resolved this and now I the box appears as intended.

If anyone else has a similar issue, pause the application at runtime using the "debugger" command in console and check the CSS stylings of the element in question. I found this by accident but could help for future!

Upvotes: 2

Related Questions