Skip to main content

Accordion

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

Extends

Constructors

new Accordion()

new Accordion(dart): Accordion

Parameters

ParameterType
dartany

Returns

Accordion

Overrides

DartWidget . constructor

Constructs

Accordion

Source

src/widgets.ts:484

Properties

PropertyModifierTypeDefault valueDescriptionInherited from
_propertiesprotectedProperty[]undefined-DartWidget._properties
_rootprotectedHTMLElementundefined-DartWidget._root
dartpublicanyundefined-DartWidget.dart
factorypublicnull | FuncnullConstructor function. No parameters, returns [Widget].DartWidget.factory
isDetachedpublicbooleanfalse-DartWidget.isDetached
propspublicanyundefined-DartWidget.props
subspublicSubscription[]undefined-DartWidget.subs
temppublicanyundefinedContains auxiliary informationDartWidget.temp

Accessors

autoHideTabHeader

get autoHideTabHeader(): boolean

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

set autoHideTabHeader(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/widgets.ts:511


context

get context(): any

An object this accordion is associated with

set context(x): void

Parameters

ParameterType
xany

Returns

any

Source

src/widgets.ts:489


get header(): HTMLElement

Header element on top of the accordion

set header(header): void

Parameters

ParameterType
headerHTMLElement

Returns

HTMLElement

Source

src/widgets.ts:507


panes

get panes(): AccordionPane[]

Returns

AccordionPane[]

Source

src/widgets.ts:502


root

get root(): HTMLElement

Widget's visual root.

Returns

HTMLElement

Source

src/widgets.ts:467


type

get type(): string

Returns

string

Source

src/widgets.ts:463

Methods

addCountPane()

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

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

Parameters

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

Returns

AccordionPane

Source

src/widgets.ts:534


addPane()

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

Adds a pane

Parameters

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

Returns

AccordionPane

Source

src/widgets.ts:527


addProperty()

private addProperty(propertyName, propertyType, defaultValue, options): any

Registers an property with the specified type, name, and defaultValue.

Parameters

ParameterTypeDefault valueDescription
propertyNamestringundefined
propertyType"string" | "bigint" | "object" | "map" | "file" | "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" | "element" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
defaultValueanynull
optionsnull | object & PropertyOptionsnull

Returns

any

Inherited from

DartWidget . addProperty

See

Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization

Source

src/widgets.ts:312


addTitle()

addTitle(element): void

Adds a title element.

Parameters

ParameterType
elementHTMLElement

Returns

void

Source

src/widgets.ts:522


apply()

apply(properties): Widget<any>

Parameters

ParameterTypeDescription
propertiesobject

Returns

Widget<any>

Inherited from

DartWidget . apply

Source

src/widgets.ts:262


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

Source

src/widgets.ts:296


end()

end(): void

Finalizes accordion construction

Returns

void

Source

src/widgets.ts:545


getDartProperties()

getDartProperties(): any[]

Returns

any[]

Inherited from

DartWidget . getDartProperties

Source

src/widgets.ts:278


getPane()

getPane(name): AccordionPane

Returns a pane with the specified name.

Parameters

ParameterTypeDescription
namestring

Returns

AccordionPane

Source

src/widgets.ts:517


getProperties()

getProperties(): Property[]

Returns

Property[]

Inherited from

DartWidget . getProperties

Source

src/widgets.ts:471


onFrameAttached()

onFrameAttached(dataFrame): void

Parameters

ParameterType
dataFrameDataFrame

Returns

void

Inherited from

DartWidget . onFrameAttached

Source

src/widgets.ts:284


onPropertyChanged()

onPropertyChanged(property): void

Gets called when viewer's property is changed.

Parameters

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

Returns

void

Inherited from

DartWidget . onPropertyChanged

Source

src/widgets.ts:276


removePane()

removePane(pane): void

Removed the specified pane.

Parameters

ParameterType
paneAccordionPane

Returns

void

Source

src/widgets.ts:540


sourceRowsChanged()

sourceRowsChanged(): void

Returns

void

Inherited from

DartWidget . sourceRowsChanged

Source

src/widgets.ts:282


sub()

sub(subscription): void

Registers a subscription to an external event.

Parameters

ParameterTypeDescription
subscriptionSubscription

Returns

void

Inherited from

DartWidget . sub

Source

src/widgets.ts:255


toDart()

toDart(): any

Returns

any

Inherited from

DartWidget . toDart

Source

src/widgets.ts:247


create()

static create(key): Accordion

Creates a new instance of Accordion

Parameters

ParameterTypeDefault value
keyanynull

Returns

Accordion

Source

src/widgets.ts:497


find()

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

Finds existing widget from its visual root.

Parameters

ParameterType
rootElement

Returns

null | Widget<any>

Inherited from

DartWidget . find

Source

src/widgets.ts:243


fromRoot()

static fromRoot(root): Widget<any>

Creates a new widget from the root element.

Parameters

ParameterType
rootHTMLElement

Returns

Widget<any>

Inherited from

DartWidget . fromRoot

Source

src/widgets.ts:335


getAll()

static getAll(): Widget<any>[]

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

DartWidget . getAll

Source

src/widgets.ts:238