React multiselect not working properly

web
mobile

Topic: React multiselect not working properly

felixisaac.dev pro asked 2 weeks ago

Expected behavior When clicked, it should drop down and show avalible options.

Actual behavior When clicked, noting happens

Resources (screenshots, code snippets etc.) I'm using copied code from the documentation;enter image description here


Piotr Glejzer staff answered a week ago

Hi,

you have to import styles before app import's like that:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import '@fortawesome/fontawesome-free/css/all.min.css';
import 'bootstrap-css-only/css/bootstrap.min.css';
import 'mdbreact/dist/css/mdb.css';
import App from './App';

import * as serviceWorker from './serviceWorker';

ReactDOM.render(<App />, document.getElementById('root'));

Best,
Piotr


felixisaac.dev pro commented a week ago

Yes, I have imported the styles;

import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import * as serviceWorker from './serviceWorker'; import "@fortawesome/fontawesome-free/css/all.min.css"; import "bootstrap-css-only/css/bootstrap.min.css"; import "mdbreact/dist/css/mdb.css"; import "./assets/css/index.css"


Piotr Glejzer staff commented a week ago

You are importing styles in the wrong direction. First styles then App. Look at my example. Thanks. Have a nice day.


felixisaac.dev pro commented a week ago

Oh, thanks. So sorry for wasting your time :)


Piotr Glejzer staff commented a week ago

It's not a problem. I'm here to help :) Have a nice day again!


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: React
  • MDB Version: 4.22.1
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No