@vectoriox/iox-ui 4.13.0 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2606,10 +2606,14 @@ function computeRelative(spec, inputs) {
|
|
|
2606
2606
|
return inputs.routeParams ?? {};
|
|
2607
2607
|
case 'current':
|
|
2608
2608
|
return inputs.subject ?? null;
|
|
2609
|
-
case 'siblings':
|
|
2610
|
-
|
|
2609
|
+
case 'siblings': {
|
|
2610
|
+
const siblings = resolveSiblings(inputs.collection, getByPath(inputs.subject, idField), {
|
|
2611
2611
|
idField, sortBy: spec.sortBy, sortDir: spec.sortDir, wrap: spec.wrap,
|
|
2612
2612
|
});
|
|
2613
|
+
// `pick` resolves the source directly to that neighbour item (named-source shape,
|
|
2614
|
+
// e.g. `nextProject`); without it the caller binds a sub-path of the whole object.
|
|
2615
|
+
return spec.pick ? siblings[spec.pick] : siblings;
|
|
2616
|
+
}
|
|
2613
2617
|
case 'related': {
|
|
2614
2618
|
const filter = buildRelatedFilter(inputs.subject, { matchFields: spec.matchFields ?? [] });
|
|
2615
2619
|
const pool = Array.isArray(inputs.collection) ? inputs.collection : [];
|