Class: AbstractButton


new AbstractButton (navbar, className, collapsable) abstract

Base navbar button class

Name Type Default Description
navbar PSV.components.Navbar
className string optional

Additional CSS classes

collapsable boolean false optional

true if the button can be moved to menu when the navbar is too small



children Array.<PSV.components.AbstractComponent> packagereadonly inherited overrides

All child components

container HTMLElement readonly inherited overrides

icon string readonly

SVG icon name injected in the button

iconActive string readonly

SVG icon name injected in the button when it is active

id string readonly

Unique identifier of the button

prop Object protected inherited overrides

Internal properties

Name Type Description
id string

Unique identifier of the button

enabled boolean
supported boolean
collapsed boolean
active boolean
width number

Reference to main controller


checkSupported () package

collapse ()

Collapses the button in the navbar menu

destroy () protected inherited overrides

Destroys the component

disable ()

Disables the button

enable ()

Enables the button

Hides the component

isSupported ()boolean | Object

Checks if the button can be displayed

Type Description
boolean | Object

isVisible ()boolean inherited overrides

Check if the component is visible

Type Description

refreshUi () package inherited overrides

Refresh UI

Must be be a very lightweight operation

Displays the component

toggle () inherited overrides

Displays or hides the component

toggleActive (active)

Changes the active state of the button

Name Type Description
active boolean optional

forced state

uncollapse ()

Uncollapses the button from the navbar menu