Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
sortFieldsList(compareFunction: Function)
[starting from version 2.9.17]
Sets custom sorting for Field List items.
sortFieldsList()
can be defined in two ways:
pivot.sortFieldsList(compareFunction)
.new Flexmonster({sortFieldsList: compareFunction, ...})
.The compareFunction
function. Defines the sort order and works similarly to the compareFunction
of the Array.sort() method. The compareFunction
should return the positive, negative, or zero value.
Data passed to the compareFunction
:
Parameter/Type | Description |
---|---|
firstItem FieldListItemObject | The first item for comparison. |
secondItem FieldListItemObject | The second item for comparison. |
viewType String | The current view type. Can be one of the following values: "pivot" , "flat" , and "drillThrough" . |
Sort Field List items in reverse alphabetical order:
pivot.sortFieldsList(function(firstItem, secondItem, viewType) {
return secondItem.caption.localeCompare(firstItem.caption);
});
See the full code on JSFiddle.