Skip to content

[5.3] Fancy-select filter missing values#45365

Merged
laoneo merged 1 commit intojoomla:5.3-devfrom
brianteeman:renderselected
Apr 25, 2025
Merged

[5.3] Fancy-select filter missing values#45365
laoneo merged 1 commit intojoomla:5.3-devfrom
brianteeman:renderselected

Conversation

@brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Apr 22, 2025

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

Usage: Whether selected choices should be removed from the list. By default choices are removed when they are selected in multiple select box. To always render choices pass always.

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:js

Actual result BEFORE applying this Pull Request

The previously selected category is removed from the list

No category selected

Image

Category selected

Image

Expected result AFTER applying this Pull Request

The categories in the list never changes

No category selected

image

Category selected

image

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

Signed-off-by: BrianTeeman <brian@teeman.net>
@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.3-dev labels Apr 22, 2025
@QuyTon
Copy link
Contributor

QuyTon commented Apr 22, 2025

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.

@richard67
Copy link
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.

@brianteeman
Copy link
Contributor Author

no change

@ChristineWk
Copy link

I have tested this item ✅ successfully on ceba074

with NPM Package


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 24, 2025
@s-harsh
Copy link

s-harsh commented Apr 24, 2025

Commit for teh PR - 45365


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

@s-harsh
Copy link

s-harsh commented Apr 24, 2025

I have tested this item ✅ successfully on ceba074

Raise PR for -45365


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45365.

@laoneo laoneo merged commit 1c0ac3d into joomla:5.3-dev Apr 25, 2025
4 of 5 checks passed
@laoneo
Copy link
Member

laoneo commented Apr 25, 2025

Thanks!

@laoneo laoneo added this to the Joomla! 5.3.1 milestone Apr 25, 2025
@brianteeman
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants