selectSort()

Opens the editor's sort picker for a sort data field on the selected component, letting a Wix user define how a data collection is ordered.

Syntax

Copy

Parameters

NameTypeDescription
dataItemKeystringKey of a data field with dataType: 'sort' in the manifest. The editor opens the picker and saves the selected rule back to this field automatically.

Returns

Promise<ElementSort | undefined>

An array of { fieldName, order } objects describing the selected sort order, or undefined if the Wix user closes the picker without selecting anything.

Example

Copy

See also

Last updated: 8 September 2026

Did this help?