mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
fix: initialize s3 file input if value already present
This commit is contained in:
@@ -746,6 +746,7 @@
|
||||
}
|
||||
}}
|
||||
defaultValue={defaultValue?.s3}
|
||||
initialValue={value}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,31 @@
|
||||
export let fileUploads: Writable<FileUploadData[]> = writable([])
|
||||
export let appPath: string | undefined = undefined
|
||||
export let disabled = false
|
||||
export let initialValue:
|
||||
| {
|
||||
s3: string
|
||||
filename: string
|
||||
}
|
||||
| undefined = undefined
|
||||
|
||||
init()
|
||||
function init() {
|
||||
console.log('initialValues', initialValue)
|
||||
if (initialValue) {
|
||||
console.log('$fileUploads', $fileUploads)
|
||||
if (!$fileUploads.find((fileUpload) => fileUpload.path === initialValue.s3)) {
|
||||
$fileUploads = [
|
||||
...$fileUploads,
|
||||
{
|
||||
name: initialValue.filename,
|
||||
size: 0,
|
||||
progress: 100,
|
||||
path: initialValue.s3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
export let computeForceViewerPolicies:
|
||||
| (() =>
|
||||
| {
|
||||
|
||||
Reference in New Issue
Block a user