Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp adaptive card extension base.viewnavigator

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-adaptive-card-extension-base > ViewNavigator

ViewNavigator class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Manages a stack of views.

Signature:

export declare class ViewNavigator<TView extends BaseView>

Remarks

The top of the stack represents the currently rendered view.

Constructors

Constructor Modifiers Description
(constructor)(_handleStackChangedCallback, _handleInitializeCallback) (BETA) Constructs a new instance of the ViewNavigator class

Properties

Property Modifiers Type Description
currentId string | undefined (BETA) Get the id of the currently rendered View from the top of the View stack
size number (BETA) Current size of the View stack.

Methods

Method Modifiers Description
pop(skipUpdate) (BETA) If there is more than one View, pops the top View from the View stack.BaseAdaptiveCardExtension.setState(), which will also trigger a render.
push(id, skipUpdate) (BETA) Pushes a new view to the top of the view stack.BaseAdaptiveCardExtension.setState(), which will also trigger a render.
register(id, initializer) (BETA) Registers a new view.
replace(id, skipUpdate) (BETA) Replaces the top view with a new view.BaseAdaptiveCardExtension.setState(), which will also trigger a render.
Clone this wiki locally