- Issue created by @cesarmsfelipe
- πͺπΈSpain cesarmsfelipe
Attached is a patch that improves handling of Select2 elements when removing a specific active filter, rather than clearing all values. This patch specifically adjusts the behavior for 'select' type fields to check for Select2 data and properly filter out the value to be removed, maintaining the rest of the selections intact. This change aims to enhance the usability and functionality of the Active Filters module when used with Select2 elements provided by BEF.
I've tested the patch on 1.0.0-rc2, and it successfully allows individual active filters to be removed from Select2 fields without affecting other selected values.
I would appreciate further testing and review.
- Assigned to cesarmsfelipe
- Status changed to Needs review
10 months ago 8:27am 3 April 2024 - First commit to issue fork.
- πΊπΈUnited States benabaird
Thanks for the report cesarmsfelipe! I'm reluctant to add checks for specific input types beyond standard HTML ones as we'd open up a situation in which we end up supporting a lot of different libraries. But I also agree that the module does need a way to support these input types.
To that end I've added a way to provide a custom removal method for active filters. Would try the patch for the issue branch and see if that works for you? Here's the documentation on how to implement.
- πΊπΈUnited States benabaird
Editing the issue title and summary to reflect the need for a way to provide custom removal methods on inputs.
- Assigned to benabaird
- πͺπΈSpain cesarmsfelipe
Thanks benabaird, I've tested the custom removal method as per the documentation you provided, and it worked correctly for me.
- Status changed to RTBC
10 months ago 1:36pm 9 April 2024 -
benabaird β
committed 6e07709f on 1.0.x
Issue #3437611: Support non-standard input types
-
benabaird β
committed 6e07709f on 1.0.x
- Status changed to Fixed
10 months ago 1:38pm 9 April 2024 - πΊπΈUnited States benabaird
Excellent, glad this solution works for you, thank you for the confirmation!
Automatically closed - issue fixed for 2 weeks with no activity.