Topic: Error when using React Table Editor

donah priority asked 2 years ago

Expected behavior I'm expecting the sample to run without error Actual behavior On this link sample I'm trying to replicate the same sample but i got an error

ReferenceError: state is not defined 6 | 7 | const Companies = () => {

8 | state = { | ^ 9 | data: { 10 | columns: [ 11 | {

enter image description here

Resources (screenshots, code snippets etc.)

You might have forgotten to import css files:

import '@fortawesome/fontawesome-free/css/all.min.css';
import 'mdb-react-ui-kit/dist/css/mdb.min.css';
import 'mdb-react-table-editor/dist/css/table-editor.min.css';

in the index.js file :)

donah priority answered 2 years ago

Sorry for the mixup, I really want to use the MDB5 So I have changed the code to use the MDB5 table editor.

The current issue now is that the icons aren't showing up and the pagination didn't render properly. I got this error when clicked New button

enter image description here

enter image description here

You are using MDB5 React but sent MDB4 React documentation link. Here is how to use the MDBDatatable component:

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 2.3.0
  • Device: windows
  • Browser: firefox
  • OS: window
  • Provided sample code: No
  • Provided link: Yes