Class: AbstractButton

PSV.buttons.AbstractButton

new PSV.buttons.AbstractButton (navbar, className, collapsable, tabbable) 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

tabbable boolean true optional

true if the button is accessible with the keyboard

Extends

Members

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

All child components

container HTMLElement readonly inherited overrides

groupId string readonly

Identifier to declare a group of buttons

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

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

Methods

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

Returns:
Type Description
boolean | Object

isVisible ()boolean inherited overrides

Checks if the component is visible

Returns:
Type Description
boolean

refreshUi () package inherited overrides

Refresh UI

Must be be a very lightweight operation

Displays the component

toggle (visible) inherited overrides

Displays or hides the component

Name Type Description
visible boolean optional

forced state

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