mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Table col fix (#9762)
* Update mantine-datatable * Improve table hook * Fix for table name - Table names must be unique - Otherwise stored column data gets corrupted * Click through on table * Tweak unit tests
This commit is contained in:
@ -88,7 +88,7 @@
|
|||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"html5-qrcode": "^2.3.8",
|
"html5-qrcode": "^2.3.8",
|
||||||
"mantine-contextmenu": "^7.15.3",
|
"mantine-contextmenu": "^7.15.3",
|
||||||
"mantine-datatable": "^7.15.1",
|
"mantine-datatable": "^7.17.1",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
|
@ -311,7 +311,7 @@ export default function BuildDetail() {
|
|||||||
content: (
|
content: (
|
||||||
<StockItemTable
|
<StockItemTable
|
||||||
allowAdd={false}
|
allowAdd={false}
|
||||||
tableName='build-outputs'
|
tableName='completed-build-outputs'
|
||||||
params={{
|
params={{
|
||||||
build: id,
|
build: id,
|
||||||
is_building: false
|
is_building: false
|
||||||
|
@ -559,13 +559,22 @@ export function InvenTreeTable<T extends Record<string, any>>({
|
|||||||
}, [tableState.queryFilters]);
|
}, [tableState.queryFilters]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
tableState.setIsLoading(
|
const loading: boolean =
|
||||||
isFetching ||
|
isFetching ||
|
||||||
isLoading ||
|
isLoading ||
|
||||||
tableOptionQuery.isFetching ||
|
tableOptionQuery.isFetching ||
|
||||||
tableOptionQuery.isLoading
|
tableOptionQuery.isLoading;
|
||||||
);
|
|
||||||
}, [isFetching, isLoading, tableOptionQuery]);
|
if (loading != tableState.isLoading) {
|
||||||
|
tableState.setIsLoading(loading);
|
||||||
|
}
|
||||||
|
}, [
|
||||||
|
isFetching,
|
||||||
|
isLoading,
|
||||||
|
tableOptionQuery.isFetching,
|
||||||
|
tableOptionQuery.isLoading,
|
||||||
|
tableState.isLoading
|
||||||
|
]);
|
||||||
|
|
||||||
// Update tableState.records when new data received
|
// Update tableState.records when new data received
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
|
|
||||||
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
||||||
import { apiUrl } from '@lib/functions/Api';
|
import { apiUrl } from '@lib/functions/Api';
|
||||||
|
import { ModelType } from '@lib/index';
|
||||||
import type { TableFilter } from '@lib/types/Filters';
|
import type { TableFilter } from '@lib/types/Filters';
|
||||||
import type { ApiFormFieldSet } from '@lib/types/Forms';
|
import type { ApiFormFieldSet } from '@lib/types/Forms';
|
||||||
import { PassFailButton } from '../../components/buttons/YesNoButton';
|
import { PassFailButton } from '../../components/buttons/YesNoButton';
|
||||||
@ -257,7 +258,8 @@ export default function BuildOrderTestTable({
|
|||||||
},
|
},
|
||||||
rowActions: rowActions,
|
rowActions: rowActions,
|
||||||
tableFilters: tableFilters,
|
tableFilters: tableFilters,
|
||||||
tableActions: tableActions
|
tableActions: tableActions,
|
||||||
|
modelType: ModelType.stockitem
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
|
@ -15,7 +15,7 @@ test('Core User/Group/Contact', async ({ browser }) => {
|
|||||||
|
|
||||||
// users
|
// users
|
||||||
await loadTab(page, 'Users');
|
await loadTab(page, 'Users');
|
||||||
await page.getByRole('cell', { name: 'admin' }).click();
|
await page.getByRole('cell', { name: 'admin', exact: true }).click();
|
||||||
await page.getByText('User: admin', { exact: true }).waitFor();
|
await page.getByText('User: admin', { exact: true }).waitFor();
|
||||||
await page.getByLabel('User Details').waitFor();
|
await page.getByLabel('User Details').waitFor();
|
||||||
await page.getByLabel('breadcrumb-1-users').click();
|
await page.getByLabel('breadcrumb-1-users').click();
|
||||||
|
@ -3540,9 +3540,9 @@ mantine-contextmenu@^7.15.3:
|
|||||||
integrity sha512-qbkbumlcxvUDavqnBZHLhskXxF9mhTD3F+mQjDc2JEqGZbPr4XHRTxFw0BAc34yKOY04Iv8WGHVwastdJHOO/A==
|
integrity sha512-qbkbumlcxvUDavqnBZHLhskXxF9mhTD3F+mQjDc2JEqGZbPr4XHRTxFw0BAc34yKOY04Iv8WGHVwastdJHOO/A==
|
||||||
|
|
||||||
mantine-datatable@^7.15.1:
|
mantine-datatable@^7.15.1:
|
||||||
version "7.15.1"
|
version "7.17.1"
|
||||||
resolved "https://registry.yarnpkg.com/mantine-datatable/-/mantine-datatable-7.15.1.tgz#c89d55c290e3d65ed7fde777a8db938122663d5f"
|
resolved "https://registry.yarnpkg.com/mantine-datatable/-/mantine-datatable-7.17.1.tgz#155373bfa318d5463f1aa8468b8117f97b033a2e"
|
||||||
integrity sha512-MwehjtkdT6FQfuPgTXmGA2Y3DmHdCdLzcl4G4LoccSpG2ul2RwEdCO/dQmrPBsNo4mMepNN9dE3/1vSuYsU+7Q==
|
integrity sha512-5GBpSTZyvVGqe2TqEaBYrZQyQjLgHuMqkb2wry+wPvwalRY0oFKG1kdFd43bxch9FOG0K0CREEa6+cYIDby55Q==
|
||||||
|
|
||||||
marked@^4.1.0:
|
marked@^4.1.0:
|
||||||
version "4.3.0"
|
version "4.3.0"
|
||||||
|
Reference in New Issue
Block a user