File

projects/components/widgets/input/rating/src/rating.component.doc.ts

Description

The wmRating component defines the rating widget.

Index

Methods
Inputs

Methods

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 rating widget

newVal any No

datavalue of the rating widget

oldVal any No

previously selected datavalue of the rating widget

Returns : void

Inputs

class
Type : string

Class of the widget.

datafield
Type : string

This property sets the dataValue to be returned by the rating widget when the rating is populated using the dataSet property.

dataset
Type : Array<any> | Object

This property accepts the options to create the rating widget. These options can be array of values, array of objects, object containing key-value pairs.
When dataset is not provided, rating is mapped with values using the maxValue property and shows the values as 1,2,3 ... upto maxValue

Bindable: true

datavalue
Type : Array<any>

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

Bindable: true

displayexpression
Type : string

This is an advanced property that gives more control over what is displayed as the rating caption. A Display Expression uses a JavaScript expression to format exactly what is shown

Bindable: true

displayfield
Type : string

This property sets the displayValue to show in the rating widget when the list is populated using the dataSet property.

iconcolor
Type : string

This property specifies the icon color.

iconsize
Type : string

This property specifies the icon size

maxvalue
Type : number
Default value : 5

This property specifies the max number of stars to be displayed. It should be less than or equal to 10.

name
Type : string

Name of the rating widget.

readonly
Type : boolean

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

Bindable: true

show
Type : boolean
Default value : true

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

Bindable: true

showcaptions
Type : boolean
Default value : true

Captions will be visible on mouse hover or on selection, if set to true

tabindex
Type : number
Default value : 0

This property specifies the tab order of the rating widget.

results matching ""

    No results matching ""