2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Retry table name query (#6540)

* Retry table name query

* Cleanup table names

* More cleanup
This commit is contained in:
Oliver 2024-02-22 01:11:56 +11:00 committed by GitHub
parent defa03b83a
commit 571b71f232
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,7 +125,7 @@ export function InvenTreeTable<T = any>({
props.tableFilters?.map((filter) => { props.tableFilters?.map((filter) => {
return { return {
...filter, ...filter,
label: filter.label ?? fieldNames[filter.name] ?? `? ${filter.name} ?` label: filter.label ?? fieldNames[filter.name] ?? `${filter.name}`
}; };
}) ?? [] }) ?? []
); );
@ -135,6 +135,7 @@ export function InvenTreeTable<T = any>({
const tableOptionQuery = useQuery({ const tableOptionQuery = useQuery({
enabled: false, enabled: false,
queryKey: ['options', url, tableState.tableKey], queryKey: ['options', url, tableState.tableKey],
retry: 3,
queryFn: async () => { queryFn: async () => {
return api return api
.options(url, { .options(url, {
@ -212,7 +213,7 @@ export function InvenTreeTable<T = any>({
return { return {
...col, ...col,
hidden: hidden, hidden: hidden,
title: col.title ?? fieldNames[col.accessor] ?? `? ${col.accessor} ?` title: col.title ?? fieldNames[col.accessor] ?? `${col.accessor}`
}; };
}); });