No Code Attached Yet bug
avatar angieradtke
angieradtke
21 Nov 2023

Steps to reproduce the issue

Backend: articles / category filter options -> Max results =10

If we search for a string (type the first letters in the field) that appears more than 10 times in the category filter in the backend,
we see maximum of 10 results as configured in the script media/system/js/fields/joomla-field-fancy-select.js.

Line 134
....
searchResultLimit: parseInt(this.select.dataset.maxResults, 10) || 10,
renderChoiceLimit: parseInt(this.select.dataset.maxRender, 10) || -1,

....

This is usually not a problem for small pages. Here in my example we are dealing with press releases from 20 subsections.

Press

  • Press subsections1
  • Press subsections2
    ...
  • Press subsections 20

So not all of them are displayed, which is really bad in this case.

avatar angieradtke angieradtke - open - 21 Nov 2023
avatar joomla-cms-bot joomla-cms-bot - change - 21 Nov 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Nov 2023
avatar brianteeman
brianteeman - comment - 21 Nov 2023

confirmed

avatar alikon
alikon - comment - 29 Feb 2024

see #42765

avatar alikon alikon - change - 29 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-29 09:45:00
Closed_By alikon
avatar alikon alikon - close - 29 Feb 2024
avatar Razzo1987
Razzo1987 - comment - 1 Mar 2024

Also in /media/system/js/fields/joomla-field-fancy-select.js the documentation indicates:

/**
 * Fancy select field, which use Choices.js
 *
 * Example:
 * <joomla-field-fancy-select ...attributes>
 *   <select>...</select>
 * </joomla-field-fancy-select>
 *
 * Possible attributes:
 *
 * allow-custom          Whether allow User to dynamically add a new value.
 * new-item-prefix=""    Prefix for a dynamically added value.
 *
 * remote-search         Enable remote search.
 * url=""                Url for remote search.
 * term-key="term"       Variable key name for searched term, will be appended to Url.
 *
 * min-term-length="1"   The minimum length a search value should be before choices are searched.
 * placeholder=""        The value of the inputs placeholder.
 * search-placeholder="" The value of the search inputs placeholder.
 *
 * data-max-results="30" The maximum amount of search results to be displayed.
 * data-max-render="30"  The maximum amount of items to be rendered, critical for large lists.
 */

So the options involving the problem are:
data-max-results
data-max-render

avatar Razzo1987
Razzo1987 - comment - 28 Mar 2024

@alikon @brianteeman Rereading @angieradtke 's problem though, I understand that she has the problem in category search. PR solves it for custom fields instead. Or am I mistaken?

avatar brianteeman
brianteeman - comment - 28 Mar 2024

you are not mistaken. I dont see any connection between that pr and this issue

avatar Quy Quy - change - 28 Mar 2024
Status Closed New
Closed_Date 2024-02-29 09:45:00
Closed_By alikon
avatar Quy Quy - reopen - 28 Mar 2024
avatar Hackwar Hackwar - change - 2 Apr 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 2 Apr 2024

Add a Comment

Login with GitHub to post a comment