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:
parent
3dd92416fe
commit
5922d9fbff
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
] : [],
|
] : [],
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
] : [],
|
] : [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user