File

projects/components/src/widgets/common/checkbox/toggle.component.doc.ts

Description

The wmToggle component defines the toggle widget.

Index

Methods
Inputs

Methods

onBlur
onBlur($event: MouseEvent, widget: any)

Callback function which will be triggered when the widget loses focus.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void
onChange
onChange($event: MouseEvent, widget: any, newVal: any, oldVal: any)

Callback function which will be triggered when the widget is clicked or when datavalue has changed.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

newVal any No

datavalue of the toggle widget

oldVal any No

previously selected datavalue of the toggle widget

Returns : void
onClick
onClick($event: MouseEvent, widget: any)

Callback function which will be triggered when the widget is clicked.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void
onFocus
onFocus($event: MouseEvent, widget: any)

Callback function which will be triggered when the widget gets focused.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void
onMouseenter
onMouseenter($event: MouseEvent, widget: any)

Callback function which will be triggered when the mouse enters the widget.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void
onMouseleave
onMouseleave($event: MouseEvent, widget: any)

Callback function which will be triggered when the mouse leaves the widget.

Parameters :
Name Type Optional Description
$event MouseEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void
onTap
onTap($event: TouchEvent, widget: any)

Callback function which will be triggered when the tap event is triggered on a widget.

Parameters :
Name Type Optional Description
$event TouchEvent No

DOM event on which call back is triggered

widget any No

Instance of the toggle widget

Returns : void

Inputs

checkedvalue

This property defines the value of the widget when the element is in the checked state. Default value is boolean value true. If specified, the value will be of string type

Type : string | boolean

Default value : true

class

Class of the widget.

Type : string

conditionalclass

This property allows user to bind expression to class property

Bindable: true

Type : any

datavalue

This property defines the initial selected value of the toggle widget.

Bindable: true

Type : any

disabled

This property will be used to disable the toggle widget. If the disabled property is true (checked), the widget becomes display-only.

Bindable: true

Type : boolean

hint

Hint text is shown of the toggle widget on hover.

Bindable: true

Type : string

name

Name of the toggle widget.

Type : string

readonly

This property will be used to make the toggle widget non-editable.

Bindable: true

Type : boolean

required

This property will be used to validate the state of the toggle widget when used inside a form widget.

Bindable: true

Type : boolean

shortcutkey

The shortcut key property specifies a shortcut key to activate/focus an element.

Type : string

show

This property will be used to show/hide the toggle widget.

Bindable: true

Type : boolean

Default value : true

tabindex

This property specifies the tab order of the toggle widget.

Type : number

Default value : 0

result-matching ""

    No results matching ""