From f02b0f430ba0e163c5795f1d51ad4523b1a3a839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Thu, 6 Jun 2024 16:54:06 +0200 Subject: [PATCH 1/4] pkp/pkp-lib#9996 Remove error for input that gets hidden --- src/components/Form/Form.vue | 3 +++ src/components/Form/fields/FieldBase.vue | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/components/Form/Form.vue b/src/components/Form/Form.vue index 52d5e0070..f3b97a4aa 100644 --- a/src/components/Form/Form.vue +++ b/src/components/Form/Form.vue @@ -74,6 +74,9 @@ export default { FormLocales, FormPage, }, + provide() { + return {removeError: this.removeError}; + }, props: { /** Used by a parent component, such as `Container`, to identify events emitted from the form and update the form props when necessary. */ id: String, diff --git a/src/components/Form/fields/FieldBase.vue b/src/components/Form/fields/FieldBase.vue index 2b76ad80a..25f472470 100644 --- a/src/components/Form/fields/FieldBase.vue +++ b/src/components/Form/fields/FieldBase.vue @@ -14,6 +14,7 @@ export default { Tooltip, MultilingualProgress, }, + inject: ['removeError'], props: { /** The key for this field. Used in the `name` attribute of ``, `