chore: fix issue where child tags would get hidden in exclusive vault mode if parent tag is in different vault (#2502)
This commit is contained in:
@@ -117,6 +117,7 @@ export interface ItemManagerInterface extends AbstractService {
|
||||
getDisplayableTags(): SNTag[]
|
||||
getTagChildren(itemToLookupUuidFor: SNTag): SNTag[]
|
||||
getTagParent(itemToLookupUuidFor: SNTag): SNTag | undefined
|
||||
getDisplayableTagParent(itemToLookupUuidFor: SNTag): SNTag | undefined
|
||||
isValidTagParent(parentTagToLookUpUuidFor: SNTag, childToLookUpUuidFor: SNTag): boolean
|
||||
isSmartViewTitle(title: string): boolean
|
||||
getDisplayableComponents(): ComponentInterface[]
|
||||
|
||||
@@ -640,6 +640,18 @@ export class ItemManager extends Services.AbstractService implements Services.It
|
||||
return undefined
|
||||
}
|
||||
|
||||
getDisplayableTagParent(itemToLookupUuidFor: Models.SNTag): Models.SNTag | undefined {
|
||||
const tag = this.findItem<Models.SNTag>(itemToLookupUuidFor.uuid)
|
||||
if (!tag) {
|
||||
return undefined
|
||||
}
|
||||
const parentId = tag.parentId
|
||||
if (parentId) {
|
||||
return this.tagDisplayController.items().find((displayableTag) => displayableTag.uuid === parentId)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
public getTagPrefixTitle(tag: Models.SNTag): string | undefined {
|
||||
const hierarchy = this.getTagParentChain(tag)
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ export class NavigationController
|
||||
}
|
||||
|
||||
get rootTags(): SNTag[] {
|
||||
return this.tags.filter((tag) => !this.items.getTagParent(tag))
|
||||
return this.tags.filter((tag) => !this.items.getDisplayableTagParent(tag))
|
||||
}
|
||||
|
||||
get tagsCount(): number {
|
||||
|
||||
Reference in New Issue
Block a user