Et2InputWidget: Do not try to validate readonly widgets, user can't change the value to fix it

This commit is contained in:
nathan 2023-01-16 08:55:31 -07:00
parent 10c646a367
commit 19c02fc91c

View File

@ -444,6 +444,11 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
*/ */
async validate() async validate()
{ {
if(this.readonly)
{
// Don't validate if the widget is read-only, there's nothing the user can do about it
return Promise.resolve();
}
let validators = [...(this.validators || []), ...(this.defaultValidators || [])]; let validators = [...(this.validators || []), ...(this.defaultValidators || [])];
let fieldName = this.id; let fieldName = this.id;
let feedbackData = []; let feedbackData = [];