No Code Attached Yet
avatar brianteeman
brianteeman
22 Apr 2025

The list of categories in 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.

Steps to reproduce the issue

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

Expected result

The categories in the list never changes

Actual result

The previously selected category is removed from the list

Screenshots

No category selected

Image

Category selected

Image

System information (as much as possible)

Additional comments

avatar brianteeman brianteeman - open - 22 Apr 2025
avatar joomla-cms-bot joomla-cms-bot - change - 22 Apr 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Apr 2025
avatar brianteeman brianteeman - change - 22 Apr 2025
The description was changed
avatar brianteeman brianteeman - edited - 22 Apr 2025
avatar brianteeman
brianteeman - comment - 22 Apr 2025

Closing as there is a pr for test8ing #45365

avatar QuyTon QuyTon - change - 22 Apr 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-04-22 17:43:51
Closed_By QuyTon
avatar QuyTon QuyTon - close - 22 Apr 2025

Add a Comment

Login with GitHub to post a comment