For Dashboard Designers Reference Index Sorting
Wednesday, May 17, 2023 12:20 PMIndex Sorting
Some resources in Graphileon can be ordered by setting an index
property (e.g. dashboards, shortcuts, context menus).
The index
property can be set on either the node or its relation (relation index takes precedence).
It can take a string or numeric value, or can be left emtpy. String indexes are sorted case-insensitively.
They are then ordered as follows:
- Numbers below 0 and numeric strings below 0 (e.g. "-9")
- 0, "0", undefined and empty
- Numbers above 0 and numeric strings above 0 (e.g. "9")
- Strings
Items with the same index are sorted by the 'name' property on the node (also case-insensitive).
Example ordering by index:
- "-12"
- -10
- "-5"
- undefined
- 1
- "5"
- "abc"
- "xy"
If multiple paths lead to the same resource, the path with the lowest index is used to determine the position of that resource in the list.