mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-21 20:44:45 +08:00
Fix moving during locations filtering [SCI-11137]
This commit is contained in:
parent
3a792ea737
commit
f6b7998458
1 changed files with 3 additions and 3 deletions
|
@ -34,13 +34,13 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
filteredStorageLocationsTreeHelper(storageLocationsTree) {
|
||||
return storageLocationsTree.map(({ storage_location, children }) => {
|
||||
return storageLocationsTree.map(({ storage_location, children, can_manage }) => {
|
||||
if (storage_location.name.toLowerCase().includes(this.query.toLowerCase())) {
|
||||
return { storage_location, children };
|
||||
return { storage_location, children, can_manage };
|
||||
}
|
||||
|
||||
const filteredChildren = this.filteredStorageLocationsTreeHelper(children);
|
||||
return filteredChildren.length ? { storage_location, children: filteredChildren } : null;
|
||||
return filteredChildren.length ? { storage_location, can_manage, children: filteredChildren } : null;
|
||||
}).filter(Boolean);
|
||||
},
|
||||
selectStorageLocation(storageLocationId) {
|
||||
|
|
Loading…
Add table
Reference in a new issue