File

packages/eui/packages/components/eui-rating/eui-rating.component.ts

Description

Rating component that can be used as a standalone start rating or within reactive forms.

Implements

ControlValueAccessor OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs
HostBindings
HostListeners
Accessors

Inputs

euiDisabled
Type : boolean
Default value : false

Whether the toggle is disabled

numberOfStars
Type : number
Default value : 5

Current numbers of stars rating to display

rating
Type : number
Default value : 0

Current rating number

Outputs

ratingChange
Type : EventEmitter

Event emitted when toggle state changes

HostBindings

attr.tabindex
Type : number
Default value : 0

Binds the tabindex attribute to the component.

class
Type : string

CSS classes applied to the host element

HostListeners

keydown
Arguments : '$event'
keydown(event: KeyboardEvent)

Methods

Public onFocusOut
onFocusOut()

Handles focus out event Notifies form control of touch event

Returns : void
onKeydown
onKeydown(event: KeyboardEvent)
Decorators :
@HostListener('keydown', ['$event'])
Parameters :
Name Type Optional
event KeyboardEvent No
Returns : void
Public registerOnChange
registerOnChange(fn: any)

Implements ControlValueAccessor Registers change handler

Parameters :
Name Type Optional
fn any No
Returns : void
Public registerOnTouched
registerOnTouched(fn: any)

Implements ControlValueAccessor Registers touch handler

Parameters :
Name Type Optional
fn any No
Returns : void
Public setDisabledState
setDisabledState(isDisabled: boolean)

Implements ControlValueAccessor Updates the rating's disabled state

Parameters :
Name Type Optional
isDisabled boolean No
Returns : void
Public writeValue
writeValue(value: number)

Implements ControlValueAccessor Updates the toggle's checked state

Parameters :
Name Type Optional
value number No
Returns : void

Properties

tabindex
Type : number
Default value : 0
Decorators :
@HostBinding('attr.tabindex')

Binds the tabindex attribute to the component.

Accessors

cssClasses
getcssClasses()

CSS classes applied to the host element

Returns : string

results matching ""

    No results matching ""