Skip to content

TypeError: Cannot read properties of undefined (reading 'id') #705

Closed
@floele

Description

@floele

Hi,

unfortunately I cannot reproduce reliably, but it seems that with the introduction of #619 the following exception occurs:

       Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
    at material-table.js:1273:1
    at Array.map (<anonymous>)
    at reduceByDefaultSort (material-table.js:1271:1)
    at getDefaultCollectionSort (material-table.js:1261:1)
    at MaterialTable.setDataManagerFields (material-table.js:776:1)
    at MaterialTable.componentDidUpdate (material-table.js:835:1)
    at commitLifeCycles (react-dom.development.js:20684:1)
    at commitLayoutEffects (react-dom.development.js:23426:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)

It occurs when switching views in my application, so I assume when loading/unloading tables.
Reason seems to be that sometimes the list of sort columns does not contain objects with a "tableData" object attached:

image

  • OS: Win11
  • Browser: Edge, Firefox

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions