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: [Bug report] Problem with MDBDatatables v.4.27.0 checkbox

yudhapratama_11 free asked 4 years ago


Expected behavior

Should Work without problems like previous version

Actual behavior mdbreact.esm.js:4227 Uncaught TypeError: Cannot read property 'checked' of undefined at r.value (mdbreact.esm.js:4227)

Resources (screenshots, code snippets etc.)

Code:

<MDBDataTableV5
     hover
      entriesOptions={[5, 20, 25]}
      entries={5}
      pagesAmount={4}
      checkbox
      headCheckboxID='id6'
      bodyCheckboxID='checkboxes6'
      multipleCheckboxes
      striped
      // getValueCheckBox={(e) => {
      //   showLogs2(e);
      // }}
      // getValueAllCheckBoxes={(e) => {
      //   showLogs2(e);
      // }}
      data={{columns: this.state.columns, rows: this.props.data}}
      noBottomColumns
    />

Error:

mdbreact.esm.js:4227 Uncaught TypeError: Cannot read property 'checked' of undefined
at r.value (mdbreact.esm.js:4227)
at commitLifeCycles (react-dom.development.js:18130)
at commitAllLifeCycles (react-dom.development.js:19674)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at commitRoot (react-dom.development.js:19898)
at react-dom.development.js:21446
at Object.unstable_runWithPriority (scheduler.development.js:255)
at completeRoot (react-dom.development.js:21445)
at performWorkOnRoot (react-dom.development.js:21368)
at performWork (react-dom.development.js:21273)
at performSyncWork (react-dom.development.js:21247)
at requestWork (react-dom.development.js:21102)
at scheduleWork (react-dom.development.js:20915)
at Object.enqueueSetState (react-dom.development.js:11596)
at MapProductFilter.push../node_modules/react/cjs/react.development.js.Component.setState (react.development.js:336)

Piotr Glejzer staff commented 4 years ago

Can you paste your data prop value?


yudhapratama_11 free commented 4 years ago

here's my prop value: [{"customer_name":"12321321","customer_number":"123021321","shipto_number":"12321321","product_code_ap":"ABC123","product_name_ap":"Medicine A","uom_apotek":"PCS","status":"A"},{"customer_name":"","customer_number":"151251","shipto_number":"3213213","product_code_ap":"FKSJE1","product_name_ap":"Medicine B","uom_apotek":"BOX","status":"N"},{"customer_name":"","customer_number":"1020401","shipto_number":"123212","product_code_ap":"TEST2","product_name_ap":"Medicine C","uom_apotek":"TST","status":"N"}]


yudhapratama_11 free commented 4 years ago

@Piotr Glejzer this is my prop value


Piotr Glejzer staff commented 4 years ago

thanks, I will test and I will try to resolve this problem soon.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: Asus
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No