Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InfoPanelViewOptions

A data type that represents the configuration options for an info panel view.

Hierarchy

Index

Properties

Optional className

className: string

CSS class name to add to the view's element.

Optional config

config: any

Configuration options for the view.

Optional data

data: any

Data to use when rendering the view.

Optional id

id: string

Unique identifier.

Optional init

init: (view: AnyInfoPanelView, contentView: InfoPanelContentView) => void

An optional function that is called when the view has been added and rendered to the DOM. This can be used to perform additional DOM manipulation and/or setup custom events.

Type declaration

Optional renderer

renderer: string | ((data: any, renderers?: Record<string, InfoPanelViewRenderer>) => string)

View renderer, which can either be an HTML string or a function that receives the view's data as a parameter and returns the final HTML for the view.

Optional request

request: (account: Account, data: any) => ApiRequest

Returns the API request used to fetch data required for this view.

Type declaration

Optional requiresData

requiresData: boolean

A Boolean value that indicates whether the view requires valid data to be provided in order for it to be rendered. When this value is true and there is no data provided, then the view will be rendered as empty.

Default value is false.

Optional static

static: boolean

A Boolean value indicating whether the view renders static data, meaning the data should only be rendered once initially regardless of changes to data or state.

Default value is false.

Optional title

title: string

View title. If defined, the title will be rendered at the top of the view container.

Optional ui

ui: {}

An object that defines the CSS selectors for various UI elements in the view and their reference keys. When a view has been rendered and added to the DOM, you can reference and access these UI targets using this.ui.#key#, where #key# is the key used with this object.

Type declaration

  • [key: string]: string

Generated using TypeDoc