Creates a sort to be used with the dataset setSort()
function.
This function is not used on its own. It is only used to create a sort
for a dataset using the setSort()
function.
When working with Wix app collections, check which fields can be used in a sort.
function sort(): WixDataSort;
import wixData from "wix-data";
// ...
$w("#myDataset").setSort(
wixData.sort().ascending("lastName").descending("age"),
);
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.