File

projects/components/src/widgets/common/rating/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

Class of the widget.

Type : string

datafield

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

Type : string

dataset

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

Type : Array<any> | Object

datavalue

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

Bindable: true

Type : Array<any>

displayexpression

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

Type : string

displayfield

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

Type : string

iconcolor

This property specifies the icon color.

Type : string

iconsize

This property specifies the icon size

Type : string

maxvalue

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

Type : number

Default value : 5

name

Name of the rating widget.

Type : string

readonly

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

Bindable: true

Type : boolean

show

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

Bindable: true

Type : boolean

Default value : true

showcaptions

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

Type : boolean

Default value : true

tabindex

This property specifies the tab order of the rating widget.

Type : number

Default value : 0

result-matching ""

    No results matching ""