Troubleshooting
Common frontend ApiTables issues and fixes
Quick checklist
Does structure load?
Network tab → GET load-table/... → success: true and non-empty columns.
If 401: auth token missing on axiosTable.
Is table prop defined before render?
if (tableStructureLoading) return <Spinner />;
return <ReactApiTable table={tableStructure} ... />;Rendering before structure arrives shows empty or broken table.
Does query-table return items?
POST query-table/{tableName} — check items array and pagination.total.
Do data_src keys match?
Compare structure columns[].data_src with keys in query items[].
Wrong load path?
Path is per feature — copy from a working page in the same app, not from docs examples blindly.
Symptom → fix
| Symptom | Likely cause | Fix |
|---|---|---|
| Blank table, no headers | Structure not loaded or empty columns | Fix backend table; check hook table URL |
| Headers but no rows | Query failing or empty filters | Network tab on query-table; check POST body |
| Infinite loading | Query error swallowed | Check console; verify tableName in structure |
| Row action does nothing | Wrong URL or success: false | Network tab on action POST; read errors |
| Action works, UI stale | Wrong onSuccess | Backend should return refetchRow or refetchData |
| Filters do not apply | filter_name mismatch | Align with backend filters |
| Export downloads fail | Blob response handling | See useUtilsProvider export branch |
| 401 redirects to login | Expected for expired session | handleNetworkErrors in errorHandling.ts |
| Custom modal empty | Control not registered | Wired controls |
| Table does not refresh after parent save | Missing refresher | Out-of-scope refresher |
Debugging tips
| Tool | Use |
|---|---|
| Redux DevTools | Inspect structureColumns, tableData, appliedFilters |
| React DevTools | Confirm ApiTablesProvider wraps table |
| Network tab | Compare structure vs query vs action sequence |
Coordinate with backend
| Frontend sees | Ask backend to check |
|---|---|
| Missing column | $TBLColumns |
| Filter ignored | filter_name vs POST field |
| Action 422 | Action key slug, callback exists |
| Wrong cell value | data_src, callbacks |