https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41151

Martin Renvoize (ashimema) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #188879|0                           |1
        is obsolete|                            |

--- Comment #31 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 189300
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189300&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to