forked from extern/egroupware
Remove all validation messages on focus, not just manual / server-side messages.
Server side ones are still re-added on blur, client-side messages are re-run.
This commit is contained in:
parent
4e1b31bb37
commit
461e83df28
@ -273,7 +273,8 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
|
|||||||
|
|
||||||
this.updateComplete.then(() =>
|
this.updateComplete.then(() =>
|
||||||
{
|
{
|
||||||
this.set_validation_error(false);
|
// Remove all messages. Manual will be explicitly replaced, other validators will be re-run on blur.
|
||||||
|
this.querySelectorAll("lion-validation-feedback").forEach(e => e.remove());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,12 +291,12 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
|
|||||||
{
|
{
|
||||||
this.validators = this.validators.concat(this._messagesHeldWhileFocused);
|
this.validators = this.validators.concat(this._messagesHeldWhileFocused);
|
||||||
this._messagesHeldWhileFocused = [];
|
this._messagesHeldWhileFocused = [];
|
||||||
|
}
|
||||||
this.updateComplete.then(() =>
|
this.updateComplete.then(() =>
|
||||||
{
|
{
|
||||||
this.validate();
|
this.validate();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
set_value(new_value)
|
set_value(new_value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user