Reference Source
import SplitDropdown from 'flarum/common/components/SplitDropdown'
public class | source

SplitDropdown

Extends:

src/common/Component.js~ComponentDropdown → SplitDropdown

The SplitDropdown component is similar to Dropdown, but the first child is displayed as its own button prior to the toggle button.

Static Method Summary

Static Public Methods
public static

initAttrs(attrs: *)

Method Summary

Public Methods
public

getButton(children: *): undefined[]

Protected Methods
protected

getFirstChild(children: *): *

Get the first child.

Inherited Summary

From class Dropdown
public static

initAttrs(attrs: *)

public
public

getMenu(items: *): *

public

oncreate(vnode: *)

public

oninit(vnode: *)

public

view(vnode: *): *

protected

getButton(children: *): *

Get the template for the button.

protected

getButtonContent(children: *): *

Get the template for the button's content.

Static Public Methods

public static initAttrs(attrs: *) source

Override:

Dropdown#initAttrs

Params:

NameTypeAttributeDescription
attrs *

Public Methods

public getButton(children: *): undefined[] source

Get the template for the button.

Override:

Dropdown#getButton

Params:

NameTypeAttributeDescription
children *

Return:

undefined[]

Protected Methods

protected getFirstChild(children: *): * source

Get the first child. If the first child is an array, the first item in that array will be returned.

Params:

NameTypeAttributeDescription
children *

Return:

*