Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IPropertyFieldStarRatingProps

interface

Public properties of the PropertyFieldStarRating custom field

Hierarchy

  • IPropertyFieldStarRatingProps

Index

Properties

Optional deferredValidationTime

deferredValidationTime: number

Custom Field will start to validate after users stop typing for deferredValidationTime milliseconds. Default value is 200.

Optional disabled

disabled: boolean

Whether the property pane field is enabled or not.

Optional emptyStarColor

emptyStarColor: string
var

Color of non-selected icons, default #333

Optional initialValue

initialValue: number
var

Initial value. Number of selected icon (0 - none, 1 - first)

Optional key

key: string
var

An UNIQUE key indicates the identity of this control

label

label: string
var

Property field label displayed on top

Optional onGetErrorMessage

onGetErrorMessage: function

The method is used to get the validation error message and determine whether the input value is valid or not.

When it returns string:

  • If valid, it returns empty string.
  • If invalid, it returns the error message string and the text field will show a red border and show an error message below the text field.

    When it returns Promise:

  • The resolved value is display as error message.
  • The rejected, the value is thrown away.

Type declaration

    • (value: number): string | Promise<string>
    • Parameters

      • value: number

      Returns string | Promise<string>

properties

properties: any
var

Parent Web Part properties

Optional starColor

starColor: string
var

Color of selected icons, default #ffb400

Optional starCount

starCount: number
var

Number of icons in rating, default 5

Optional starSize

starSize: number
var

Star size, default 24

Methods

onPropertyChange

  • onPropertyChange(propertyPath: string, oldValue: any, newValue: any): void
  • function

    Defines a onPropertyChange function to raise when the selected value changed. Normally this function must be always defined with the 'this.onPropertyChange' method of the web part object.

    Parameters

    • propertyPath: string
    • oldValue: any
    • newValue: any

    Returns void

Generated using TypeDoc