Open
Description
mantine-react-table version
2.0.0-beta.9, 1.3.4
react & react-dom versions
18.3.1
Describe the bug and the steps to reproduce it
When using the isLoading (or any other loading UI option) and the data is empty, if you use accessorFn with nested properties you get an error that crashes the table.
You can reproduce the problem by following the demo at Loading UI (https://www.mantine-react-table.com/docs/guides/async-loading#loading-demo) and using an accessorFn
I have a stackblitz here https://stackblitz.com/edit/github-vq95pemy?file=src%2FTS.tsx
Minimal, Reproducible Example - (Optional, but Recommended)
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
Terms
- I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Reacted by Dimitris Bratanis, Zisis Zikos, Λlisue and Yury Kastov
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]accessorFn called when loading UI crashes table[/-][+]accessorFn called when loading UI with empty data crashes table[/+]keshane commentedon Nov 14, 2025
For those encountering this problem, one workaround is to handle the null/undefined cases in your
accessorFns andCells, but adding an extra if-clause is distracting.Other workaround is to use a helper function to define another list of MRT_ColumnDefs for the
isLoadingcase. I created a helper function for our project that others may find helpful.Usage:
keshane commentedon Nov 14, 2025
I briefly looked into fixing it upstream, but the base Tanstack table doesn't have the concept of
isLoadingor skeletons so that code can't know when to avoid accessing row data.