Topic: MDBSelect not working
innovative23 pro asked 6 years ago
goldfarbdev priority answered 6 years ago
I had the same problem. I properly installed the pro version with a yarn add, not forgetting to include my token in the mdbreact:... in package.json.
The real culprit in the end though was in my index.js. I'm not sure, but in comparing the pro zip download (MDB-React-Pro-npm) to my original free version, the order of imports for the css was different.
WRONG:
import './index.scss';
import App from './App';
import 'font-awesome/css/font-awesome.min.css';
import 'bootstrap-css-only/css/bootstrap.min.css';
import 'mdbreact/dist/css/mdb.css';
Correct
import 'font-awesome/css/font-awesome.min.css';
import 'bootstrap-css-only/css/bootstrap.min.css';
import 'mdbreact/dist/css/mdb.css';
import './index.scss';
import App from './App';
Jakub Mandra staff commented 6 years ago
Yes, imports of mdbreact styles must be included Before components. Its because those files are loaded synchronously from top to bottom.
Anna Morawska staff answered 6 years ago
"mdbreact": "^4.8.1"
"mdbreact": "git+https://oauth2:<YOUR TOKEN HERE>@git.mdbootstrap.com/mdb/react/re-pro.git"Don't forget to put your token there. Then run npm install It should help. Best, Ania
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: 4.7.1
- Device: laptop
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
innovative23 pro commented 6 years ago
Does MDBSelect work for anyone else?