IPropertyPaneDynamicTextFieldProps interface

Warning

This API is now deprecated.

  • This has been replaced by IPropertyPaneDynamicFieldProps

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

PropertyPaneDynamicData component props.

Properties

ariaLabel

ARIA Label for text field, if any.

description

The text field input description.

disabled

Whether the property pane text field is enabled or not.

errorMessage

If set, this will be displayed as an error message.

label

Label for the text field.

onGetErrorMessage

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

placeholder

Placeholder text to be displayed in the text field.

validateOnFocusIn

Run validation when the PropertyPaneTextField is focused.

validateOnFocusOut

Run validation when the PropertyPaneTextField is out of focus or on blur.

value

Value to be displayed in the text field when the value of the targetProperty in the manifest's property bag is empty or contains null value.

Property Details

ariaLabel

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

ARIA Label for text field, if any.

ariaLabel?: string;

Property Value

string

description

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The text field input description.

description?: string;

Property Value

string

disabled

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Whether the property pane text field is enabled or not.

disabled?: boolean;

Property Value

boolean

errorMessage

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

If set, this will be displayed as an error message.

errorMessage?: string;

Property Value

string

Remarks

When onGetErrorMessage returns empty string, if this property has a value set then this will be displayed as the error message.

Make sure to set this only if you want to see an error message displayed for the text field.

label

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Label for the text field.

label?: string;

Property Value

string

onGetErrorMessage

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

onGetErrorMessage?: (value: string) => string | Promise<string>;

Property Value

(value: string) => string | Promise<string>

Remarks

When it returns string:

  • If valid, it returns empty string.

  • If invalid, it returns the error message string and an error message is displayed below the text field.

When it returns Promise<string>:

  • The resolved value is display as error message.

  • The rejected, the value is thrown away.

placeholder

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Placeholder text to be displayed in the text field.

placeholder?: string;

Property Value

string

validateOnFocusIn

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Run validation when the PropertyPaneTextField is focused.

validateOnFocusIn?: boolean;

Property Value

boolean

Remarks

The default value is false.

validateOnFocusOut

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Run validation when the PropertyPaneTextField is out of focus or on blur.

validateOnFocusOut?: boolean;

Property Value

boolean

Remarks

The default value is false.

value

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Value to be displayed in the text field when the value of the targetProperty in the manifest's property bag is empty or contains null value.

value?: string;

Property Value

string