From 90d2af45e9571dada4964c10b43e207d52892d04 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Sun, 23 Nov 2025 10:16:48 +0500 Subject: [PATCH] Navigate from ID presenter (#10242) Signed-off-by: Denis Bykhov --- .../src/components/DocTable.svelte | 2 +- .../src/components/IdPresenter.svelte | 28 +++++++++++++++++-- .../src/components/Table.svelte | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/plugins/view-resources/src/components/DocTable.svelte b/plugins/view-resources/src/components/DocTable.svelte index 9d0debebd7..be1bf07159 100644 --- a/plugins/view-resources/src/components/DocTable.svelte +++ b/plugins/view-resources/src/components/DocTable.svelte @@ -86,7 +86,7 @@ disabled: true } : {} - if (attribute.collectionAttr) { + if (attribute.collectionAttr || attribute.attribute?.type?._class === core.class.TypeIdentifier) { return { object, ...attribute.props, ...readonlyParams } } if (attribute.attribute?.type._class === core.class.EnumOf) { diff --git a/plugins/view-resources/src/components/IdPresenter.svelte b/plugins/view-resources/src/components/IdPresenter.svelte index 009cf8d515..4ff98969c6 100644 --- a/plugins/view-resources/src/components/IdPresenter.svelte +++ b/plugins/view-resources/src/components/IdPresenter.svelte @@ -13,10 +13,15 @@ // limitations under the License. --> - - {value ?? ''} - +{#if object !== undefined} + + + {value ?? ''} + + +{:else} + + {value ?? ''} + +{/if} diff --git a/plugins/view-resources/src/components/Table.svelte b/plugins/view-resources/src/components/Table.svelte index 225e85c092..64c511bc70 100644 --- a/plugins/view-resources/src/components/Table.svelte +++ b/plugins/view-resources/src/components/Table.svelte @@ -269,7 +269,7 @@ readonly: !editable, editable } - if (attribute.collectionAttr) { + if (attribute.collectionAttr || attribute.attribute?.type?._class === core.class.TypeIdentifier) { return { object, ...attribute.props, ...readonlyParams } } if (attribute.attribute?.type._class === core.class.EnumOf) {