[5.3] Fancy-select filter missing values#45365
Merged
laoneo merged 1 commit intojoomla:5.3-devfrom Apr 25, 2025
Merged
Conversation
Signed-off-by: BrianTeeman <brian@teeman.net>
Contributor
|
I have tested this item ✅ successfully on ceba074 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365. |
Member
|
@brianteeman What happens if you have selected an item in the pull down so it is in the filter, and then select it again in the pull down? Does that deselect the item, or does it stay selected, i.e. no change? Just am curious how it works, not that I would have a problem with the one or the other. But I don't have the time right now to test it myself. |
Contributor
Author
|
no change |
|
I have tested this item ✅ successfully on ceba074 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365. |
Member
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365. |
|
Commit for teh PR - 45365 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365. |
|
I have tested this item ✅ successfully on ceba074 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365. |
Member
|
Thanks! |
Contributor
Author
|
thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for #45362
Summary of Changes
In a fancy-select filter such as the list of categories in the article manager the dropdown excludes the currently selected category.
This causes problems if that category has any subcategories as they now appear to be the children of a completely different category
This is caused by the choices.js script which by default removes selected items from the list which is fine for a flat list but causes the described problem on a nested list.
The solution is documented here https://github.com/Choices-js/Choices?tab=readme-ov-file#renderselectedchoices
This PR changes the setting from auto to always
Testing Instructions
Create two categories
Create subcategories for both of the above
Using the category filter select one of the parent categories
Now try to select one of the child categories
As this is a JS change you will need to test either a prebuilt package or
npm run build:jsActual result BEFORE applying this Pull Request
The previously selected category is removed from the list
No category selected
Category selected
Expected result AFTER applying this Pull Request
The categories in the list never changes
No category selected
Category selected
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
cc @laoneo