Make visibleIf async in SpecialNavModel (#2684)

Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
This commit is contained in:
Denis Bunakalya
2023-02-27 10:03:03 +07:00
committed by GitHub
parent 96f0fef450
commit 8f0f69f144
6 changed files with 26 additions and 19 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ export interface SpecialNavModel {
componentProps?: Record<string, string>
// If not top and bottom, position will be sorted alphabetically.
position?: 'top' | 'bottom' | string // undefined == 'top
visibleIf?: Resource<(spaces: Space[]) => boolean>
visibleIf?: Resource<(spaces: Space[]) => Promise<boolean>>
// If defined, will be used to find spaces for visibleIf
spaceClass?: Ref<Class<Space>>
}