You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding both ACS & DESC sorting for the same key, the UI select should have each option with different values and only one 'selected' at a time.
Actual Behaviour
When adding both ACS & DESC for the same key, the UI has each option, but they have the same value and both are selected
Reproduce Scenario (including but not limited to)
Modify the ProductListImpl to add price with sorting options with ASC & DESC for the same key. searchOptions.addSorterKey("price", "Price (low to high)", Sorter.Order.ASC); searchOptions.addSorterKey("price", "Price (high to low)", Sorter.Order.DESC);
On the UI, the sorting dropdown has both Price (low to high) and Price (high to low) options, but they are both selected and they both have the same value (with sort_order=asc).
Expected Behaviour
When adding both ACS & DESC sorting for the same key, the UI select should have each option with different values and only one 'selected' at a time.
Actual Behaviour
When adding both ACS & DESC for the same key, the UI has each option, but they have the same value and both are selected
Reproduce Scenario (including but not limited to)
Modify the ProductListImpl to add price with sorting options with ASC & DESC for the same key.
searchOptions.addSorterKey("price", "Price (low to high)", Sorter.Order.ASC);
searchOptions.addSorterKey("price", "Price (high to low)", Sorter.Order.DESC);
On the UI, the sorting dropdown has both
Price (low to high)
andPrice (high to low)
options, but they are both selected and they both have the same value (withsort_order=asc
).Steps to Reproduce
See above
Platform and Version
AEMaaCS - aem-sdk-quickstart-2022.2.6433.20220223T194056Z-220100.jar
Sample Code that illustrates the problem
On https://github.com/adobe/aem-core-cif-components/blob/master/bundles/core/src/main/java/com/adobe/cq/commerce/core/search/internal/services/SearchResultsServiceImpl.java I think we need to modify the condition and check for both key and order from the params:
if (sortKeyParam.equals(key.getName()) && sortOrder.equals(key.getOrder())) {
keyImpl.setSelected(true);
sorter.setCurrentKey(key);
keyOrder = sortOrder;
resultSorterKey = keyImpl;
} else if (keyOrder == null) {
keyOrder = sortOrder;
}
Logs taken while reproducing problem
N/A
The text was updated successfully, but these errors were encountered: