Describe the bug
Search reset button should clean up the search fields and trigger a search to show all the results.
In some cases, the button is clicked and nothing happens. Clicking it a second time, works fine.
The issue happens in 3.12.x and main branches.
To Reproduce
Steps to reproduce the behavior:
Case 1:
- In the home page, filter by a topic category.
- In the search page, click the reset button --> Search is executed and shows all results
- Go (with the application logo in the top bar) to the home page and select the same topic category
- In the search page, click the Reset button, nothing happens.
- Click the Reset button a second time and then it works
Case 2:
- In the search page, click the search button for an empty search
- Write a search filter and click the search button
- Click reset --> First time doesn't work, second works
Expected behavior
Clicking the Reset button once, cleanups the search fields and executes an empty search to return all the results.
Additional context
The code involved it's
|
if (angular.equals(params, gnSearchLocation.getParams())) { |
|
triggerSearchFn(false); |
|
} else { |
|
gnSearchLocation.setSearch(params); |
|
} |
When it doesn't work, executes:
|
gnSearchLocation.setSearch(params); |
the next time, that works, enters in:
But if you go directly to the search page, do a search and click reset (that seems working), executes also:
|
gnSearchLocation.setSearch(params); |
A bit unclear what is causing this wrong behaviour.
Describe the bug
Search reset button should clean up the search fields and trigger a search to show all the results.
In some cases, the button is clicked and nothing happens. Clicking it a second time, works fine.
The issue happens in
3.12.xandmainbranches.To Reproduce
Steps to reproduce the behavior:
Case 1:
Case 2:
Expected behavior
Clicking the Reset button once, cleanups the search fields and executes an empty search to return all the results.
Additional context
The code involved it's
core-geonetwork/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
Lines 321 to 325 in 2731e56
When it doesn't work, executes:
core-geonetwork/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
Line 324 in 2731e56
the next time, that works, enters in:
core-geonetwork/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
Line 322 in 2731e56
But if you go directly to the search page, do a search and click reset (that seems working), executes also:
core-geonetwork/web-ui/src/main/resources/catalog/components/search/searchmanager/SearchFormDirective.js
Line 324 in 2731e56
A bit unclear what is causing this wrong behaviour.