mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 12:10:59 +00:00
Fix: Treegrid is loading an eternity for huge amounts of data (#3451)
* Added default max depth and lazy loading to StorageLocation * Added default max depth and lazy loading to PartCategory * Update API version * lint: fix * Added INVENTREE_TREE_DEPTH setting * Refactored int conversion into own helper function * Added tests
This commit is contained in:
@ -876,6 +876,16 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
||||
'default': True,
|
||||
},
|
||||
|
||||
'INVENTREE_TREE_DEPTH': {
|
||||
'name': _('Tree Depth'),
|
||||
'description': _('Default tree depth for treeview. Deeper levels can be lazy loaded as they are needed.'),
|
||||
'default': 1,
|
||||
'validator': [
|
||||
int,
|
||||
MinValueValidator(0),
|
||||
]
|
||||
},
|
||||
|
||||
'BARCODE_ENABLE': {
|
||||
'name': _('Barcode Support'),
|
||||
'description': _('Enable barcode scanner support'),
|
||||
|
Reference in New Issue
Block a user