Bugzilla – Attachment 188879 Details for
Bug 41151
Vue Additional Fields UX Improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41151: Wire clearable prop through FormElement to input components
Bug-41151-Wire-clearable-prop-through-FormElement-.patch (text/plain), 2.89 KB, created by
Martin Renvoize (ashimema)
on 2025-11-01 14:47:44 UTC
(
hide
)
Description:
Bug 41151: Wire clearable prop through FormElement to input components
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-01 14:47:44 UTC
Size:
2.89 KB
patch
obsolete
>From 2e1a59385d665e51bb147ab6837851d208ab250d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Sat, 1 Nov 2025 14:30:45 +0000 >Subject: [PATCH] Bug 41151: Wire clearable prop through FormElement to input > components > >This patch enables the clearable functionality in forms that use the >BaseResource/FormElement pattern by passing the clearable attribute >from field definitions through to the underlying input components. > >Changes: >- Updated FormElement to pass clearable prop to InputText >- Updated FormElement to pass clearable prop to InputNumber >- Updated FormElement to pass clearable prop to TextArea > >The logic only passes clearable when explicitly defined in the field >configuration, allowing the component's default (true) to apply when >not specified. This means: > >- Fields without clearable attribute: clear button enabled (default) >- Fields with clearable: false: clear button disabled >- Fields with clearable: true: clear button explicitly enabled > >All text, number, and textarea fields in BaseResource forms (like >agreements, packages, titles, etc.) now automatically get the clear >button UX unless explicitly disabled. > >Example to disable for a specific field: > { > name: "my_field", > type: "text", > label: $__("My Field"), > clearable: false, // Disable clear button for this field > } > >This completes the clear button UX implementation across all form >input patterns in the application. >--- > .../intranet-tmpl/prog/js/vue/components/FormElement.vue | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >index 372d866900d..c8e14a49af5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/FormElement.vue >@@ -14,6 +14,9 @@ > :required="attr.required ? true : false" > :size="attr.size" > :disabled="disabled" >+ :clearable=" >+ attr.clearable !== undefined ? attr.clearable : undefined >+ " > @update:modelValue="checkForInputError()" > /> > </template> >@@ -24,6 +27,9 @@ > :placeholder="attr.placeholder || attr.label" > :required="attr.required ? true : false" > :disabled="disabled" >+ :clearable=" >+ attr.clearable !== undefined ? attr.clearable : undefined >+ " > @update:modelValue="checkForInputError()" > /> > </template> >@@ -36,6 +42,9 @@ > :placeholder="attr.placeholder || attr.label" > :required="attr.required ? true : false" > :disabled="disabled" >+ :clearable=" >+ attr.clearable !== undefined ? attr.clearable : undefined >+ " > @update:modelValue="checkForInputError()" > /> > </template> >-- >2.51.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41151
:
188814
|
188815
|
188816
|
188817
|
188818
|
188819
|
188820
|
188821
|
188822
|
188874
|
188875
|
188876
|
188877
|
188878
| 188879 |
188880