Skip to main content

Class: Accordion

dg.Accordion

Accordion control with collapsible/expandable panes. Samples: https://public.datagrok.ai/js/samples/ui/accordion

Hierarchy

Constructors

constructor

new Accordion(dart)

Constructs

Accordion

Parameters

NameType
dartany

Overrides

DartWidget.constructor

Defined in

src/widgets.ts:438

Properties

_properties

Protected _properties: Property[]

Inherited from

DartWidget._properties

Defined in

src/widgets.ts:164


_root

Protected _root: HTMLElement

Inherited from

DartWidget._root

Defined in

src/widgets.ts:163


dart

dart: any

Inherited from

DartWidget.dart

Defined in

src/widgets.ts:167


factory

factory: null | Func = null

Constructor function. No parameters, returns [Widget].

Inherited from

DartWidget.factory

Defined in

src/widgets.ts:161


isDetached

isDetached: boolean = false

Inherited from

DartWidget.isDetached

Defined in

src/widgets.ts:168


props

props: any

Inherited from

DartWidget.props

Defined in

src/widgets.ts:165


subs

subs: Subscription[]

Inherited from

DartWidget.subs

Defined in

src/widgets.ts:166


temp

temp: any

Contains auxiliary information

Inherited from

DartWidget.temp

Defined in

src/widgets.ts:158

Accessors

autoHideTabHeader

get autoHideTabHeader(): boolean

Whether tab header should be hidden if there is only one tab

Returns

boolean

Defined in

src/widgets.ts:465

set autoHideTabHeader(x): void

Parameters

NameType
xboolean

Returns

void

Defined in

src/widgets.ts:466


context

get context(): any

An object this accordion is associated with

Returns

any

Defined in

src/widgets.ts:443

set context(x): void

Parameters

NameType
xany

Returns

void

Defined in

src/widgets.ts:446


get header(): HTMLElement

Header element on top of the accordion

Returns

HTMLElement

Defined in

src/widgets.ts:461

set header(header): void

Parameters

NameType
headerHTMLElement

Returns

void

Defined in

src/widgets.ts:462


panes

get panes(): AccordionPane[]

Returns

AccordionPane[]

Defined in

src/widgets.ts:456


root

get root(): HTMLElement

Widget's visual root.

Returns

HTMLElement

Inherited from

DartWidget.root

Defined in

src/widgets.ts:421


type

get type(): string

Returns

string

Inherited from

DartWidget.type

Defined in

src/widgets.ts:417

Methods

addCountPane

addCountPane(name, getContent, getCount, expanded?, before?): AccordionPane

Adds a pane with the count indicator next to the title. getCount() is executed immediately.

Parameters

NameTypeDefault value
namestringundefined
getContent() => HTMLElementundefined
getCount() => numberundefined
expandedbooleanfalse
beforenull | AccordionPanenull

Returns

AccordionPane

Defined in

src/widgets.ts:487


addPane

addPane(name, getContent, expanded?, before?): AccordionPane

Adds a pane

Parameters

NameTypeDefault value
namestringundefined
getContent() => HTMLElementundefined
expandedbooleanfalse
beforenull | AccordionPanenull

Returns

AccordionPane

Defined in

src/widgets.ts:481


addProperty

Private addProperty(propertyName, propertyType, defaultValue?, options?): any

Registers an property with the specified type, name, and defaultValue. Registered property gets added to {@see properties}. Returns default value, thus allowing to combine registering a property with the initialization

Parameters

NameTypeDefault value
propertyNamestringundefined
propertyType"string" | "bigint" | "object" | "map" | "view" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
defaultValueanynull
optionsnull | { [key: string]: any; } & PropertyOptionsnull

Returns

any

Inherited from

DartWidget.addProperty

Defined in

src/widgets.ts:264


addTitle

addTitle(element): void

Adds a title element.

Parameters

NameType
elementHTMLElement

Returns

void

Defined in

src/widgets.ts:476


apply

apply(properties): Widget<any>

Parameters

NameType
propertiesobject

Returns

Widget<any>

Inherited from

DartWidget.apply

Defined in

src/widgets.ts:216


detach

detach(): void

Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.

Returns

void

Inherited from

DartWidget.detach

Defined in

src/widgets.ts:248


end

end(): void

Finalizes accordion construction

Returns

void

Defined in

src/widgets.ts:497


getDartProperties

getDartProperties(): any[]

Returns

any[]

Inherited from

DartWidget.getDartProperties

Defined in

src/widgets.ts:232


getPane

getPane(name): AccordionPane

Returns a pane with the specified name.

Parameters

NameType
namestring

Returns

AccordionPane

Defined in

src/widgets.ts:471


getProperties

getProperties(): Property[]

Returns

Property[]

Inherited from

DartWidget.getProperties

Defined in

src/widgets.ts:425


onFrameAttached

onFrameAttached(dataFrame): void

Parameters

NameType
dataFrameDataFrame

Returns

void

Inherited from

DartWidget.onFrameAttached

Defined in

src/widgets.ts:236


onPropertyChanged

onPropertyChanged(property): void

Gets called when viewer's property is changed.

Parameters

NameTypeDescription
propertynull | Propertyor null, if multiple properties were changed.

Returns

void

Inherited from

DartWidget.onPropertyChanged

Defined in

src/widgets.ts:230


removePane

removePane(pane): void

Removed the specified pane.

Parameters

NameType
paneAccordionPane

Returns

void

Defined in

src/widgets.ts:492


sub

sub(subscription): void

Registers a subscription to an external event.

Parameters

NameType
subscriptionSubscription

Returns

void

Inherited from

DartWidget.sub

Defined in

src/widgets.ts:209


toDart

toDart(): any

Returns

any

Inherited from

DartWidget.toDart

Defined in

src/widgets.ts:201


create

Static create(key?): Accordion

Creates a new instance of Accordion

Parameters

NameTypeDefault value
keyanynull

Returns

Accordion

Defined in

src/widgets.ts:451


find

Static find(root): null | Widget<any>

Finds existing widget from its visual root.

Parameters

NameType
rootElement

Returns

null | Widget<any>

Inherited from

DartWidget.find

Defined in

src/widgets.ts:197


fromRoot

Static fromRoot(root): Widget<any>

Creates a new widget from the root element.

Parameters

NameType
rootHTMLElement

Returns

Widget<any>

Inherited from

DartWidget.fromRoot

Defined in

src/widgets.ts:287


getAll

Static getAll(): Widget<any>[]

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

DartWidget.getAll

Defined in

src/widgets.ts:192