No Code Attached Yet bug
avatar heelc29
heelc29
13 Apr 2023

Steps to reproduce the issue

open any list view (eg. plugins)

Expected result

J4.2.10-dev: clear button is disabled
image

Actual result

J4.3.0-rc4-dev: clear button is not disabled
image

Additional comments

This behavior is broken with #39772 @dgrammatiko by adding the if condition mainContainer

getFilterFields() {
if (this.mainContainer) {
return Array.prototype.slice.call(this.mainContainer.querySelectorAll('select,input'));
}
if (this.filterContainer) {
return Array.prototype.slice.call(this.filterContainer.querySelectorAll('select,input'));
}
return [];
}

and so now evaluation for filter fields also include the ordering (which are maybe always are active)

this.getFilterFields().forEach((item) => {
if (item.classList.contains('active')) {
activeFilterCount += 1;
if (cont.filterButton) {
cont.filterButton.classList.remove('btn-secondary');
cont.filterButton.classList.add('btn-primary');
}
}
});

avatar heelc29 heelc29 - open - 13 Apr 2023
avatar joomla-cms-bot joomla-cms-bot - change - 13 Apr 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Apr 2023
avatar richard67 richard67 - change - 13 Apr 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 13 Apr 2023
avatar chmst
chmst - comment - 16 Apr 2023

I do not think that this is a bug. In J3 the clear button was always active and I used it also to clear the search input field.

avatar brianteeman
brianteeman - comment - 16 Apr 2023

Sorry to disagree but it is a bug. In Joomla 4.2 the button is always disabled UNLESS a filter is selected OR a search term is used.

dis

avatar chmst
chmst - comment - 16 Apr 2023

I was missing this feature from J3. But indeed the button was disabled in former J4 versions.

avatar brianteeman
brianteeman - comment - 16 Apr 2023

I was missing this feature from J3.

it is still there (after a search)

avatar richard67
richard67 - comment - 16 Apr 2023

Closing as having a pull request. Please test #40398 . Thanks in advance.

avatar richard67 richard67 - change - 16 Apr 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-04-16 22:15:33
Closed_By richard67
avatar richard67 richard67 - close - 16 Apr 2023

Add a Comment

Login with GitHub to post a comment