EZQMS-236: QE templates >> Have the ability to make a section mandatory (#3581)

Signed-off-by: Anna No <anna.no@xored.com>
This commit is contained in:
Anna No 2023-08-11 14:22:56 +07:00 committed by GitHub
parent 659f3dcd40
commit 281cd65f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -52,6 +52,7 @@
on:click
on:delete
on:action
on:valid
>
<slot />
</Ctor>
@ -67,6 +68,7 @@
on:click
on:delete
on:action
on:valid
/>
{/if}
</ErrorBoundary>

View File

@ -75,6 +75,11 @@
function openFile () {
inputFile.click()
}
function updateContent (evt: CustomEvent) {
attachments = evt.detail.length
dispatch('attachments', evt.detail)
}
</script>
<div class="antiSection" use:resizeObserver={(element) => (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}
/>
</Scroller>
@ -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}