Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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 https://mdbootstrap.com/plugins/react/table-editor/ 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 https://mdbootstrap.com/docs/b5/react/plugins/table-editor/. 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: https://mdbootstrap.com/docs/b5/react/data/datatables/



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

  • 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