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

Fix mode switching for part category table (#3881)

* Fix mode switching for part category table

* Fix for StockLocation table
This commit is contained in:
Oliver 2022-10-30 15:04:48 +11:00 committed by GitHub
parent 3dd92416fe
commit 5922d9fbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 36 deletions

View File

@ -1878,15 +1878,16 @@ function loadPartCategoryTable(table, options) {
}, },
event: () => { event: () => {
inventreeSave('category-tree-view', 0); inventreeSave('category-tree-view', 0);
table.bootstrapTable(
'refreshOptions', // Adjust table options
{ options.treeEnable = false;
treeEnable: false, options.serverSort = false;
serverSort: true, options.search = true;
search: true, options.pagination = true;
pagination: true,
} // Destroy and re-create the table
); table.bootstrapTable('destroy');
loadPartCategoryTable(table, options);
} }
}, },
{ {
@ -1897,15 +1898,16 @@ function loadPartCategoryTable(table, options) {
}, },
event: () => { event: () => {
inventreeSave('category-tree-view', 1); inventreeSave('category-tree-view', 1);
table.bootstrapTable(
'refreshOptions', // Adjust table options
{ options.treeEnable = true;
treeEnable: true, options.serverSort = false;
serverSort: false, options.search = false;
search: false, options.pagination = false;
pagination: false,
} // Destroy and re-create the table
); table.bootstrapTable('destroy');
loadPartCategoryTable(table, options);
} }
} }
] : [], ] : [],

View File

@ -2351,15 +2351,16 @@ function loadStockLocationTable(table, options) {
}, },
event: () => { event: () => {
inventreeSave('location-tree-view', 0); inventreeSave('location-tree-view', 0);
table.bootstrapTable(
'refreshOptions', // Adjust table options
{ options.treeEnable = false;
treeEnable: false, options.serverSort = true;
serverSort: true, options.search = true;
search: true, options.pagination = true;
pagination: true,
} // Destroy and re-create the table
); table.bootstrapTable('destroy');
loadStockLocationTable(table, options);
} }
}, },
{ {
@ -2370,15 +2371,16 @@ function loadStockLocationTable(table, options) {
}, },
event: () => { event: () => {
inventreeSave('location-tree-view', 1); inventreeSave('location-tree-view', 1);
table.bootstrapTable(
'refreshOptions', // Adjust table options
{ options.treeEnable = true;
treeEnable: true, options.serverSort = false;
serverSort: false, options.search = false;
search: false, options.pagination = false;
pagination: false,
} // Destroy and re-create the table
); table.bootstrapTable('destroy');
loadStockLocationTable(table, options);
} }
} }
] : [], ] : [],