Material Select not opening

MDB SupportCategory: MDB ReactMaterial Select not opening
garrithsteyn Pro UserPremium asked 1 week ago in MDB pro, version:4.6.1

Hi

I have taken the Material Select directly from the example, but it does not open/dropdown when I click on it.

Any idea why this could be happening and how to fix it?

 

<Select>
<SelectInput selected=”Choose your option”></SelectInput>
<SelectOptions>
<SelectOption disabled>Choose your option</SelectOption>
<SelectOption>Option nr 1</SelectOption>
<SelectOption>Option nr 2</SelectOption>
<SelectOption>Option nr 3</SelectOption>
<SelectOption>Option nr 4</SelectOption>
<SelectOption>Option nr 5</SelectOption>
</SelectOptions>
</Select>

garrithsteyn Pro UserPremium replied 4 days ago

Hi Anna
1. Created a clean react app using `create-react-app`.
2. Added mdbreact dependency to package.json using “mdbreact”: “git+https://oauth2:TOKEN@git.mdbootstrap.com/mdb/react/re-pro.git”.
3. Imported font-awesome, bootstrap and mdb style sheets under index.js.
4. Imported `import { Select, SelectInput, SelectOption, SelectOptions } from ‘mdbreact’;` under App.js
5. Added sample Material Select as posted in original post above.
6. Tested in Chrome, Firefox and Edge. It doesn’t work in any of the browsers and no console warnings appear.

Anna Morawska replied 5 days ago

Hi,
thank you for reporting this. I’ve tried to recreate this situation and it looks like everything works fine. Please, make sure you have the latest MDB React Pro version. It should fix the problem. If not, please let us know which browser you use, and are there any console warnings or errors.
Best,
Anna

Jakub Królak Pro UserPremium replied 1 week ago

I’m having the same issue, please help 🙂

1 Answers
garrithsteyn Pro UserPremium answered 2 days ago

Since mdb support is sleeping, I found a fix for this problem.

Thanks to @glockwood for finding the workaround.

 

If you edit node_modules/mdbreact/dist/css/mdb.css, line 9591

Remove

display: none;

in

.dropdown-content

class.

 

Cheers

Anna Morawska replied 2 days ago

Hi garrithsteyn,
thank you for posting your solution. It’s strange, I’ve just tested it again, and on my environment, it works perfectly fine.
We will take a closer look at this in the next sprint.
Best, Ania