Feature NPM Resource Changed PR-5.3-dev PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar keep
keep
1 Oct 2025

Pull Request for Issue #46178

Summary of Changes

  • Added support for the data-fuse-threshold attribute in <select> elements used by joomla-field-fancy-select.
  • This allows the fuseOptions.threshold parameter of Choices.js to be configurable instead of fixed at 0.3.
  • Default remains 0.3 for backward compatibility.

Testing Instructions

  1. Create a form XML field definition with layout="joomla.form.field.list-fancy-select".
  2. Add the new attribute data-fuse-threshold="0.1" to the <field> element.
  3. Load the form in the Joomla backend and try searching in the select box.
  4. Compare the fuzzy search sensitivity with and without the data-fuse-threshold attribute.
  5. Verify that when no attribute is set, the behavior falls back to the default 0.3.

Actual result BEFORE applying this Pull Request

  • fuseOptions.threshold was hardcoded to 0.3 and could not be adjusted.

Expected result AFTER applying this Pull Request

  • Developers can set a custom fuseOptions.threshold value via data-fuse-threshold.
  • If the attribute is missing, it falls back to 0.3.

Link to documentation

  • No documentation changes for docs.joomla.org needed
avatar keep keep - open - 1 Oct 2025
avatar keep keep - change - 1 Oct 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Oct 2025
Category JavaScript Repository NPM Change
avatar richard67
richard67 - comment - 1 Oct 2025

New features have to be made for the 6.1-dev branch.

avatar richard67
richard67 - comment - 2 Oct 2025

Hmm, I see the related issue was a feature request, but now I see what this PR does, and that seems to be fully b/c, so it could be fine for 5.x. As the 5.3-dev branch is close to end of life we might rebase this PR soon to 5.4-dev.

The reason for the failing CI actions is not related to this PR. Currently they are failing in the 5.3-dev branch, too. The reason is known.

avatar Fedik
Fedik - comment - 2 Oct 2025

yeah, It is kind of fix that is also feature 😄

avatar keep keep - change - 9 Oct 2025
Labels Added: Feature NPM Resource Changed PR-5.3-dev
avatar keep
keep - comment - 9 Oct 2025

Updated as suggested by @Fedik — now checking dataset.fuseThreshold safely before parsing. Thanks for the feedback!

avatar richard67 richard67 - change - 9 Oct 2025
Labels Added: PR-6.1-dev
avatar richard67 richard67 - change - 9 Oct 2025
Title
Add configurable fuseOptions.threshold for Choices.js (issue #46178)
[6.1] Add configurable fuseOptions.threshold for Choices.js (issue #46178)
avatar richard67 richard67 - edited - 9 Oct 2025

Add a Comment

Login with GitHub to post a comment