Reference Source
import Dropdown from 'flarum/components/Dropdown.js'
public class | source

Dropdown

Extends:

flarum/Component~Component → Dropdown

The Dropdown component displays a button which, when clicked, shows a dropdown menu beneath it.

Props

  • buttonClassName A class name to apply to the dropdown toggle button.
  • menuClassName A class name to apply to the dropdown menu.
  • icon The name of an icon to show in the dropdown toggle button.
  • caretIcon The name of an icon to show on the right of the button.
  • label The label of the dropdown toggle button. Defaults to 'Controls'.
  • onhide
  • onshow

The children will be displayed as a list inside of the dropdown menu.

Static Method Summary

Static Public Methods
public static

initProps(props: *)

Method Summary

Public Methods
public

config(isInitialized: *)

public

getMenu(items: *): *

public

view(): *

Protected Methods
protected

getButton(): *

Get the template for the button.

protected

Get the template for the button's content.

Static Public Methods

public static initProps(props: *) source

Params:

NameTypeAttributeDescription
props *

Public Methods

public config(isInitialized: *) source

Params:

NameTypeAttributeDescription
isInitialized *

public getMenu(items: *): * source

Params:

NameTypeAttributeDescription
items *

Return:

*

public view(): * source

Return:

*

Protected Methods

protected getButton(): * source

Get the template for the button.

Return:

*

protected getButtonContent(): * source

Get the template for the button's content.

Return:

*