If you add onGetErrorMessage
which returns a Promise of an empty string (i.e. it passes validation), the value of the TextField is cleared when you click or Tab away (blur) from the TextField.
Sample Code:
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return {
pages: [
{
header: {
description: strings.PropertyPaneDescription
},
groups: [
{
groupName: strings.BasicGroupName,
groupFields: [
PropertyPaneTextField('description', {
label: strings.DescriptionFieldLabel,
onGetErrorMessage: (): Promise<string> => {
return Promise.resolve('')
}
})
]
}
]
}
]
};
}
Results:
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I can also confirm that I am seeing this issue in LinksAndHandlebarsTemplate web parts which is currently in production in multiple tenants.
I also seeing a similar behaviour with the out of the box Document Library web part, specifically the Folder property.
Validation works for a entering an incorrect value, but when entering a valid value, it disappears.
Thanks all for the repro. We've identified the break and have a fix.
Ok, great me and my customer are waiting for this very welcome fix as well, keep us in the loop, thx!
Yes true. Pls keep us posted with the solution.
Most helpful comment
Thanks all for the repro. We've identified the break and have a fix.