Feature No Code Attached Yet
avatar keep
keep
28 Sep 2025

Is your feature request related to a problem? Please describe.

Currently joomla-field-fancy-select uses Choices.js with fuseOptions.threshold = 0.3.
This causes fuzzy matching even for numeric lists. For example, searching 1043 also returns results like 1003, 103, 1031, etc.
In some cases this behaviour is undesirable when exact matching is required.

Describe the solution you'd like

I was thinking it might be useful to make the fuseOptions.threshold configurable through an attribute (e.g. data-fuse-threshold="0").
By default it could stay at 0.3, so the change would be fully backward compatible and not affect existing installations.

Additional context

File: media/system/js/fields/joomla-field-fancy-select.js
Relevant code:

fuseOptions: {
  threshold: 0.3 // Strict search
}
avatar keep keep - open - 28 Sep 2025
avatar joomla-cms-bot joomla-cms-bot - change - 28 Sep 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Sep 2025
avatar richard67 richard67 - change - 28 Sep 2025
Labels Added: Feature
avatar richard67 richard67 - labeled - 28 Sep 2025
avatar Fedik
Fedik - comment - 1 Oct 2025

If need more strict search then we can just reduce default value to let say 0.1 - 0.2.
It was set to 0.3 from default 1 already.

I do not see a need for introducing a new option. But can be added of course.

avatar keep
keep - comment - 2 Oct 2025

At the moment I’m developing a custom fields plugin where I use a list-fancy-select field containing numeric values. In that case, having a strict mode (even 0.0) would be important. On the other hand, for text searches the fuzzy logic could be indeed useful to balance out typos.

That’s why I thought it might be helpful to make this configurable, while keeping it backwards compatible. Of course, the default value can still be adjusted as needed.

avatar Fedik
Fedik - comment - 2 Oct 2025

Okay, then it is fine

Add a Comment

Login with GitHub to post a comment