mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +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:
		| @@ -1878,15 +1878,16 @@ function loadPartCategoryTable(table, options) { | ||||
|                 }, | ||||
|                 event: () => { | ||||
|                     inventreeSave('category-tree-view', 0); | ||||
|                     table.bootstrapTable( | ||||
|                         'refreshOptions', | ||||
|                         { | ||||
|                             treeEnable: false, | ||||
|                             serverSort: true, | ||||
|                             search: true, | ||||
|                             pagination: true, | ||||
|                         } | ||||
|                     ); | ||||
|  | ||||
|                     // Adjust table options | ||||
|                     options.treeEnable = false; | ||||
|                     options.serverSort = false; | ||||
|                     options.search = true; | ||||
|                     options.pagination = true; | ||||
|  | ||||
|                     // Destroy and re-create the table | ||||
|                     table.bootstrapTable('destroy'); | ||||
|                     loadPartCategoryTable(table, options); | ||||
|                 } | ||||
|             }, | ||||
|             { | ||||
| @@ -1897,15 +1898,16 @@ function loadPartCategoryTable(table, options) { | ||||
|                 }, | ||||
|                 event: () => { | ||||
|                     inventreeSave('category-tree-view', 1); | ||||
|                     table.bootstrapTable( | ||||
|                         'refreshOptions', | ||||
|                         { | ||||
|                             treeEnable: true, | ||||
|                             serverSort: false, | ||||
|                             search: false, | ||||
|                             pagination: false, | ||||
|                         } | ||||
|                     ); | ||||
|  | ||||
|                     // Adjust table options | ||||
|                     options.treeEnable = true; | ||||
|                     options.serverSort = false; | ||||
|                     options.search = false; | ||||
|                     options.pagination = false; | ||||
|  | ||||
|                     // Destroy and re-create the table | ||||
|                     table.bootstrapTable('destroy'); | ||||
|                     loadPartCategoryTable(table, options); | ||||
|                 } | ||||
|             } | ||||
|         ] : [], | ||||
|   | ||||
| @@ -2351,15 +2351,16 @@ function loadStockLocationTable(table, options) { | ||||
|                 }, | ||||
|                 event: () => { | ||||
|                     inventreeSave('location-tree-view', 0); | ||||
|                     table.bootstrapTable( | ||||
|                         'refreshOptions', | ||||
|                         { | ||||
|                             treeEnable: false, | ||||
|                             serverSort: true, | ||||
|                             search: true, | ||||
|                             pagination: true, | ||||
|                         } | ||||
|                     ); | ||||
|  | ||||
|                     // Adjust table options | ||||
|                     options.treeEnable = false; | ||||
|                     options.serverSort = true; | ||||
|                     options.search = true; | ||||
|                     options.pagination = true; | ||||
|  | ||||
|                     // Destroy and re-create the table | ||||
|                     table.bootstrapTable('destroy'); | ||||
|                     loadStockLocationTable(table, options); | ||||
|                 } | ||||
|             }, | ||||
|             { | ||||
| @@ -2370,15 +2371,16 @@ function loadStockLocationTable(table, options) { | ||||
|                 }, | ||||
|                 event: () => { | ||||
|                     inventreeSave('location-tree-view', 1); | ||||
|                     table.bootstrapTable( | ||||
|                         'refreshOptions', | ||||
|                         { | ||||
|                             treeEnable: true, | ||||
|                             serverSort: false, | ||||
|                             search: false, | ||||
|                             pagination: false, | ||||
|                         } | ||||
|                     ); | ||||
|  | ||||
|                     // Adjust table options | ||||
|                     options.treeEnable = true; | ||||
|                     options.serverSort = false; | ||||
|                     options.search = false; | ||||
|                     options.pagination = false; | ||||
|  | ||||
|                     // Destroy and re-create the table | ||||
|                     table.bootstrapTable('destroy'); | ||||
|                     loadStockLocationTable(table, options); | ||||
|                 } | ||||
|             } | ||||
|         ] : [], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user