File

projects/components/widgets/input/default/src/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
Type : string | boolean
Default value : true

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

class
Type : string

Class of the widget.

conditionalclass
Type : any

This property allows user to bind expression to class property

Bindable: true

datavalue
Type : any

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

Bindable: true

disabled
Type : boolean

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

Bindable: true

hint
Type : string

Hint text is shown of the toggle widget on hover.

Bindable: true

name
Type : string

Name of the toggle widget.

readonly
Type : boolean

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

Bindable: true

required
Type : boolean

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

Bindable: true

shortcutkey
Type : string

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

show
Type : boolean
Default value : true

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

Bindable: true

tabindex
Type : number
Default value : 0

This property specifies the tab order of the toggle widget.

results matching ""

    No results matching ""