BaseAdaptiveCardQuickView class

Base class for an Adaptive Card quick view.

Extends

BaseQuickView<TProperties, TState>

Remarks

Views used to render the Quick view must inherit from this class.

Properties

data

The data used to render the Adaptive Card.

focusParameters

An optional focus element to set focus when the view is rendered for accessibility purposes.

template

The Adaptive Card template rendered by the view.

Methods

onAction(action)

Action handler for Adaptive Card Actions.

onActionError(error)

Error handler for Adaptive Card Actions.

Property Details

data

The data used to render the Adaptive Card.

/** @virtual */
get data(): TData;

Property Value

TData

focusParameters

An optional focus element to set focus when the view is rendered for accessibility purposes.

/** @virtual */
get focusParameters(): IFocusParameters | undefined;

Property Value

IFocusParameters | undefined

Remarks

If not overriden, the focus element defaulted to the first actionable element of the quick view.

template

The Adaptive Card template rendered by the view.

/** @virtual */
abstract get template(): ISPFxAdaptiveCard;

Property Value

Remarks

The format of the template must be valid Adaptive Card JSON.

Method Details

onAction(action)

Action handler for Adaptive Card Actions.

/** @virtual */
onAction(action: IActionArguments): void;

Parameters

action
IActionArguments

The IActionArguments for the current event.

Returns

void

onActionError(error)

Note

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.

Error handler for Adaptive Card Actions.

/** @virtual */
onActionError(error: IActionErrorArguments): void;

Parameters

error
IActionErrorArguments

The IActionErrorArguments for the current event.

Returns

void