isNavigable

Updated:

Checks Tecton or platform level features to see if they can be navigated to.

Description

The isNavigable capability allows modules to safely check if another Tecton or platform-level feature is configured to be navigated to via something like navigateTo. Within a module, this is determined by whether or not the navigable key is set to true or false in the feature's configuration. If the moduleName argument is not provided, the capability will find the module that has the primary key set to true and return the result of that module's navigable key.

Signature

tecton.sources.isNavigable(featureName: string, moduleName?: string): Promise<boolean>;

Usage

Check if a feature is able to be navigated directly to.

const canNavigate = await tecton.sources.isNavigable('MyFeature', 'Main');
if (canNavigate) {
    showFeatureLink();
}

Parameters

featureName
moduleName

Release Notes

Tecton
0.12.0

Platform Support

UUX