Skip to content

Latest commit

 

History

History

BEFORE_SORT_EXECUTED

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

<< Back To List

BEFORE_SORT_EXECUTED

When Executed ? : This event is triggered when the sort order is changed from the search page or collection page.

Purpose: It allows for the modification of the sort payload.

Below are examples illustrating how to utilize this event.

Modify Sort Order

window.wizzyConfig.events.registerEvent(window.wizzyConfig.events.allowedEvents.BEFORE_SORT_EXECUTED, function (data) {
     data.order = "desc"
    return data;
});

Sample data of BEFORE_SORT_EXECUTED

{
    "value": "createdAt",
    "order": "asc"
}