diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte
index f21361d4f0..12a9e2d7b4 100644
--- a/packages/ui/src/components/Component.svelte
+++ b/packages/ui/src/components/Component.svelte
@@ -52,6 +52,7 @@
on:click
on:delete
on:action
+ on:valid
>
@@ -67,6 +68,7 @@
on:click
on:delete
on:action
+ on:valid
/>
{/if}
diff --git a/plugins/attachment-resources/src/components/Attachments.svelte b/plugins/attachment-resources/src/components/Attachments.svelte
index 7c83b7ff4f..8c8882966f 100644
--- a/plugins/attachment-resources/src/components/Attachments.svelte
+++ b/plugins/attachment-resources/src/components/Attachments.svelte
@@ -75,6 +75,11 @@
function openFile () {
inputFile.click()
}
+
+ function updateContent (evt: CustomEvent) {
+ attachments = evt.detail.length
+ dispatch('attachments', evt.detail)
+ }
(wSection = element.clientWidth)}>
@@ -151,9 +156,7 @@
options={{ sort: { pinned: -1 } }}
query={{ ...query, attachedTo: objectId }}
loadingProps={{ length: attachments ?? 0 }}
- on:content={(evt) => {
- attachments = evt.detail.length
- }}
+ on:content={updateContent}
{readonly}
/>
@@ -175,9 +178,7 @@
options={{ sort: { pinned: -1 } }}
query={{ ...query, attachedTo: objectId }}
loadingProps={{ length: attachments ?? 0 }}
- on:content={(evt) => {
- attachments = evt.detail.length
- }}
+ on:content={updateContent}
{readonly}
/>
{/if}