Skip to main content

Accordion

Defined in: src/widgets/containers.ts:20

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

Extends

Constructors

Constructor

new Accordion(dart): Accordion

Defined in: src/widgets/containers.ts:23

Parameters

ParameterType
dartany

Returns

Accordion

Constructs

Accordion

Overrides

DartWidget.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_functionsprotectedFunc[][]-DartWidget._functionssrc/widgets/base.ts:243
_propertiesprotectedProperty[][]-DartWidget._propertiessrc/widgets/base.ts:242
_rootprotectedHTMLElementundefined-DartWidget._rootsrc/widgets/base.ts:241
dartpublicanyundefined-DartWidget.dartsrc/widgets/base.ts:246
factorypublicFunc | nullnullConstructor function. No parameters, returns [Widget].DartWidget.factorysrc/widgets/base.ts:239
isDetachedpublicbooleanfalse-DartWidget.isDetachedsrc/widgets/base.ts:247
propspublicanyundefined-DartWidget.propssrc/widgets/base.ts:244
subspublicSubscription[]undefined-DartWidget.subssrc/widgets/base.ts:245
temppublicanyundefinedContains auxiliary informationDartWidget.tempsrc/widgets/base.ts:236

Accessors

autoHideTabHeader

Get Signature

get autoHideTabHeader(): boolean

Defined in: src/widgets/containers.ts:50

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

Returns

boolean

Set Signature

set autoHideTabHeader(x): void

Defined in: src/widgets/containers.ts:51

Parameters
ParameterType
xboolean
Returns

void


children

Get Signature

get children(): Widget<any>[]

Defined in: src/widgets/base.ts:320

Parent widget up the DOM tree, or null.

Returns

Widget<any>[]

Inherited from

DartWidget.children


context

Get Signature

get context(): any

Defined in: src/widgets/containers.ts:28

An object this accordion is associated with

Returns

any

Set Signature

set context(x): void

Defined in: src/widgets/containers.ts:31

Parameters
ParameterType
xany
Returns

void


Get Signature

get header(): HTMLElement

Defined in: src/widgets/containers.ts:46

Header element on top of the accordion

Returns

HTMLElement

Set Signature

set header(header): void

Defined in: src/widgets/containers.ts:47

Parameters
ParameterType
headerHTMLElement
Returns

void


panes

Get Signature

get panes(): AccordionPane[]

Defined in: src/widgets/containers.ts:41

Returns

AccordionPane[]


parent

Get Signature

get parent(): Widget<any> | null

Defined in: src/widgets/base.ts:317

Parent widget up the DOM tree, or null.

Returns

Widget<any> | null

Inherited from

DartWidget.parent


root

Get Signature

get root(): HTMLElement

Defined in: src/widgets/base.ts:398

Widget's visual root.

Returns

HTMLElement

Inherited from

DartWidget.root


type

Get Signature

get type(): string

Defined in: src/widgets/base.ts:397

Returns

string

Inherited from

DartWidget.type

Methods

addCountPane()

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

Defined in: src/widgets/containers.ts:73

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

Parameters

ParameterTypeDefault value
namestringundefined
getContent() => HTMLElementundefined
getCount() => numberundefined
expandedbooleanfalse
beforeAccordionPane | nullnull
allowDragOutbooleantrue

Returns

AccordionPane


addPane()

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

Defined in: src/widgets/containers.ts:66

Adds a pane

Parameters

ParameterTypeDefault value
namestringundefined
getContent() => HTMLElementundefined
expandedbooleanfalse
beforeAccordionPane | nullnull
allowDragOutbooleantrue

Returns

AccordionPane


addTitle()

addTitle(element): void

Defined in: src/widgets/containers.ts:61

Adds a title element.

Parameters

ParameterType
elementHTMLElement

Returns

void


apply()

apply(properties): Widget

Defined in: src/widgets/base.ts:284

Parameters

ParameterTypeDescription
propertiesobject-

Returns

Widget

Inherited from

DartWidget.apply


detach()

detach(): void

Defined in: src/widgets/base.ts:329

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


end()

end(): void

Defined in: src/widgets/containers.ts:84

Finalizes accordion construction

Returns

void


getDartProperties()

getDartProperties(): any[]

Defined in: src/widgets/base.ts:305

Returns

any[]

Inherited from

DartWidget.getDartProperties


getFunctions()

getFunctions(): Func[]

Defined in: src/widgets/base.ts:400

Functions that are applicable to this particular widget. Used in the UI to display context actions, and for the AI integrations.

Returns

Func[]

Inherited from

DartWidget.getFunctions


getPane()

getPane(name): AccordionPane

Defined in: src/widgets/containers.ts:56

Returns a pane with the specified name.

Parameters

ParameterTypeDescription
namestring-

Returns

AccordionPane


getProperties()

getProperties(): Property[]

Defined in: src/widgets/base.ts:399

Returns all properties of this widget.

Returns

Property[]

Inherited from

DartWidget.getProperties


getWidgetStatus()

getWidgetStatus(): IWidgetStatus

Defined in: src/widgets/base.ts:401

Returns the widget's runtime structure for automated testing and introspection.

Returns

IWidgetStatus

Inherited from

DartWidget.getWidgetStatus


onEvent()

onEvent(eventId?): Observable<any>

Defined in: src/widgets/base.ts:403

Observes events with the specified eventId. Override in subclasses to provide actual events.

Parameters

ParameterTypeDefault value
eventIdstring | nullnull

Returns

Observable<any>

Inherited from

DartWidget.onEvent


onFrameAttached()

onFrameAttached(dataFrame): void

Defined in: src/widgets/base.ts:311

Parameters

ParameterType
dataFrameDataFrame

Returns

void

Inherited from

DartWidget.onFrameAttached


onPropertyChanged()

onPropertyChanged(property): void

Defined in: src/widgets/base.ts:303

Gets called when viewer's property is changed.

Parameters

ParameterTypeDescription
propertyProperty | nullor null, if multiple properties were changed.

Returns

void

Inherited from

DartWidget.onPropertyChanged


removePane()

removePane(pane): void

Defined in: src/widgets/containers.ts:79

Removed the specified pane.

Parameters

ParameterType
paneAccordionPane

Returns

void


sourceRowsChanged()

sourceRowsChanged(): void

Defined in: src/widgets/base.ts:309

Returns

void

Inherited from

DartWidget.sourceRowsChanged


sub()

sub(subscription): void

Defined in: src/widgets/base.ts:277

Registers a subscription to an external event.

Parameters

ParameterTypeDescription
subscriptionSubscription-

Returns

void

Inherited from

DartWidget.sub


toDart()

toDart(): any

Defined in: src/widgets/base.ts:269

Returns

any

Inherited from

DartWidget.toDart


create()

static create(key?): Accordion

Defined in: src/widgets/containers.ts:36

Creates a new instance of Accordion

Parameters

ParameterTypeDefault value
keyanynull

Returns

Accordion


find()

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

Defined in: src/widgets/base.ts:265

Finds existing widget from its visual root.

Parameters

ParameterType
rootElement

Returns

Widget<any> | null

Inherited from

DartWidget.find


fromRoot()

static fromRoot(root): Widget

Defined in: src/widgets/base.ts:374

Creates a new widget from the root element.

Parameters

ParameterType
rootHTMLElement

Returns

Widget

Inherited from

DartWidget.fromRoot


getAll()

static getAll(): Widget<any>[]

Defined in: src/widgets/base.ts:260

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

DartWidget.getAll