2
0
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:
luwol03
2022-08-05 00:07:12 +02:00
committed by GitHub
parent a2c2d1d0a4
commit a9e22d0ae9
10 changed files with 225 additions and 36 deletions

View File

@ -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'),