MDBDatatable

launchbrigade pro premium priority asked 3 years ago

Expected behavior

Get search results

Actual behavior

Get blank page

Resources (screenshots, code snippets etc.)

<MDBDatatable advancedData search data={basicData} />

Pretty much sums it up. Entering ANY character in the search page returns a blank page


Wojciech Staniszewski staff commented 3 years ago

Could you show me what your basicData looks like? Hard to debug this issue without any more code.


launchbrigade pro premium priority commented 3 years ago

{ columns: [ { label: 'Name', field: 'name', sort: true }, { label: 'ID', field: 'id', sort: false }, { label: 'Contact', field: 'contact', sort: false }, ], rows: [], }


launchbrigade pro premium priority answered 3 years ago

oh I forgot the errors:

Uncaught TypeError: Cannot read properties of null (reading 'toString')

react-dom.development.js:20085 The above error occurred in the <_n> component:


I created MDBDatatable component like here:

        <MDBDatatable
          advancedData
          search
          data={{
            columns: [
              { label: 'Name', field: 'name', sort: true },
              { label: 'ID', field: 'id', sort: false },
              { label: 'Contact', field: 'contact', sort: false },
            ],
            rows: [
              {name: 'demo', id: 1, contact: 'test'}
            ],
          }}
        />

and search seems to be working correctly. If the problem still occurs, please create the repository on GitHub and send the link here.


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: Pro
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: Mac
  • Browser: Chrome, Firefox, Safari
  • OS: Monterey
  • Provided sample code: No
  • Provided link: No