How to use mdbreact in ReactJS


Topic: How to use mdbreact in ReactJS

Rahul Sharma asked 7 years ago

I had installed MDB using "npm install --save mdbreact" and used " import {Button} from 'mdbreact'; " on my index.js page

but when I am using <Button className="primary"/> on AboutPage then, It throws an error saying

 

Element ref was specified as a string (ripple) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).

 

 


john blakley commented 7 years ago

same here

Mikołaj Smoleński staff answered 7 years ago

We’ve fixed this bug by updating our product to the latest React version and changing refs into ReactDOM in Waves component. Please delete mdbreact from package.json and add it again to dependencies like this: “mdbreact”:”git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git#react-upgrade” We’ll fix it also in the next update of mdbreact in npm. Regards

Bruno Miyamotto Luque pro commented 6 years ago

Hi Im using MDBPro and use "mdbreact": "git+https://oauth2:11111-my--token-11111@git.mdbootstrap.com/mdb/react/re-pro.git" and its not working. Heroku rejects it, thanks

Bartłomiej Malanowski staff pro premium commented 6 years ago

Could you please share your project with me at b.malanowski@mdbootstrap.com ?

navshbk answered 6 years ago

Hi,

I am binding MDB datatable from "api". I don't want to display all the columns like (Id, CustomerId etc.) in the gfrid. How can I hide columns in this datatable?


Jakub Mandra staff premium commented 6 years ago

Hi,

You will have to write your custom css with something like this:

.table.dataTable thead tr th:nth-of-type(YOUR\_SELECTOR) { display: none }
.table.dataTable tbody tr td:nth-of-type(YOUR\_SELECTOR) { display: none }

Best,

Jakub


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No