跳到主要内容

interface_ui.IViewPicker

interface/ui.IViewPicker

Properties

allowedTypes

Optional allowedTypes: ViewType[]

An array indicating which view types can be selected.


placeholder

Optional placeholder: string

The placeholder text when no view is selected. Defaults to 'Please pick'


viewId

Optional viewId: string

The selected view ID.


disabled

Optional disabled: boolean

If set to true, the user cannot interact with the select.


datasheet

Optional datasheet: Datasheet

The parent datasheet model to select view from. If null or undefined, the picker default datasheet associated with the widget.


controlJump

Optional controlJump: boolean

Beta API, possible feature changes.

If this option is turned on, the selected view in this ViewPicker will be used as the target view for "Jump to link datasheet" in the dashboard.

The jump to the link datasheet can only be the datasheet to which the widget is bound.

Note: In the same widget, the controlJump option can only be set in one ViewPicker; if the controlJump option is set in multiple ViewPickers, the function will not be guaranteed to work properly.

Recommendation: When this feature is enabled, you should use useCloudStorage to do persistent storage for the selected view, otherwise it may cause exceptions.

Methods

onChange

Optional onChange(option): void

A function to be called when the selected view changes.

Parameters

NameType
optionIOption

Returns

void