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
Parameter | Type |
---|---|
dart | any |
Returns
Overrides
Constructs
Accordion
Source
Properties
Property | Modifier | Type | Default value | Description | Inherited from |
---|---|---|---|---|---|
_properties | protected | Property [] | undefined | - | DartWidget ._properties |
_root | protected | HTMLElement | undefined | - | DartWidget ._root |
dart | public | any | undefined | - | DartWidget .dart |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. | DartWidget .factory |
isDetached | public | boolean | false | - | DartWidget .isDetached |
props | public | any | undefined | - | DartWidget .props |
subs | public | Subscription [] | undefined | - | DartWidget .subs |
temp | public | any | undefined | Contains auxiliary information | DartWidget .temp |
Accessors
autoHideTabHeader
get
autoHideTabHeader():boolean
Whether tab header should be hidden if there is only one tab
set
autoHideTabHeader(x
):void
Parameters
Parameter | Type |
---|---|
x | boolean |
Returns
boolean
Source
context
get
context():any
An object this accordion is associated with
set
context(x
):void
Parameters
Parameter | Type |
---|---|
x | any |
Returns
any
Source
header
get
header():HTMLElement
Header element on top of the accordion
set
header(header
):void
Parameters
Parameter | Type |
---|---|
header | HTMLElement |
Returns
HTMLElement
Source
panes
get
panes():AccordionPane
[]
Returns
Source
root
get
root():HTMLElement
Widget's visual root.
Returns
HTMLElement
Source
type
get
type():string
Returns
string
Source
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
Parameter | Type | Default value |
---|---|---|
name | string | undefined |
getContent | () => HTMLElement | undefined |
getCount | () => number | undefined |
expanded | boolean | false |
before | null | AccordionPane | null |
allowDragOut | boolean | true |
Returns
Source
addPane()
addPane(
name
,getContent
,expanded
,before
,allowDragOut
):AccordionPane
Adds a pane
Parameters
Parameter | Type | Default value |
---|---|---|
name | string | undefined |
getContent | () => HTMLElement | undefined |
expanded | boolean | false |
before | null | AccordionPane | null |
allowDragOut | boolean | true |
Returns
Source
addProperty()
private
addProperty(propertyName
,propertyType
,defaultValue
,options
):any
Registers an property with the specified type, name, and defaultValue.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
propertyName | string | undefined | |
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 | |
defaultValue | any | null | |
options | null | object & PropertyOptions | null |
Returns
any
Inherited from
See
Registered property gets added to properties. Returns default value, thus allowing to combine registering a property with the initialization
Source
addTitle()
addTitle(
element
):void
Adds a title element.
Parameters
Parameter | Type |
---|---|
element | HTMLElement |
Returns
void
Source
apply()
apply(
properties
):Widget
<any
>
Parameters
Parameter | Type | Description |
---|---|---|
properties | object |
Returns
Widget
<any
>
Inherited from
Source
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
Source
end()
end():
void
Finalizes accordion construction
Returns
void
Source
getDartProperties()
getDartProperties():
any
[]
Returns
any
[]
Inherited from
DartWidget
. getDartProperties
Source
getPane()
getPane(
name
):AccordionPane
Returns a pane with the specified name.
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Returns
Source
getProperties()
getProperties():
Property
[]
Returns
Property
[]
Inherited from
Source
onFrameAttached()
onFrameAttached(
dataFrame
):void
Parameters
Parameter | Type |
---|---|
dataFrame | DataFrame |
Returns
void
Inherited from
Source
onPropertyChanged()
onPropertyChanged(
property
):void
Gets called when viewer's property is changed.
Parameters
Parameter | Type | Description |
---|---|---|
property | null | Property | or null, if multiple properties were changed. |
Returns
void
Inherited from
DartWidget
. onPropertyChanged
Source
removePane()
removePane(
pane
):void
Removed the specified pane.
Parameters
Parameter | Type |
---|---|
pane | AccordionPane |
Returns
void
Source
sourceRowsChanged()
sourceRowsChanged():
void
Returns
void
Inherited from
DartWidget
. sourceRowsChanged
Source
sub()
sub(
subscription
):void
Registers a subscription to an external event.
Parameters
Parameter | Type | Description |
---|---|---|
subscription | Subscription |
Returns
void
Inherited from
Source
toDart()
toDart():
any
Returns
any
Inherited from
Source
create()
static
create(key
):Accordion
Creates a new instance of Accordion
Parameters
Parameter | Type | Default value |
---|---|---|
key | any | null |
Returns
Source
find()
static
find(root
):null
|Widget
<any
>
Finds existing widget from its visual root.
Parameters
Parameter | Type |
---|---|
root | Element |
Returns
null
| Widget
<any
>
Inherited from
Source
fromRoot()
static
fromRoot(root
):Widget
<any
>
Creates a new widget from the root element.
Parameters
Parameter | Type |
---|---|
root | HTMLElement |
Returns
Widget
<any
>
Inherited from
Source
getAll()
static
getAll():Widget
<any
>[]
Returns all currently active widgets.
Returns
Widget
<any
>[]