mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 08:01:38 +00:00
fix path bind
This commit is contained in:
@@ -72,8 +72,8 @@
|
||||
fullNamePlaceholder = undefined,
|
||||
namePlaceholder = '',
|
||||
initialPath,
|
||||
path = $bindable(''),
|
||||
error = $bindable(''),
|
||||
path = $bindable(undefined),
|
||||
error = $bindable(undefined),
|
||||
disabled = $bindable(false),
|
||||
checkInitialPathExistence = false,
|
||||
autofocus = true,
|
||||
@@ -83,6 +83,15 @@
|
||||
disableEditing = false
|
||||
}: Props = $props()
|
||||
|
||||
$effect.pre(() => {
|
||||
if (path == undefined) {
|
||||
path = ''
|
||||
}
|
||||
if (error == undefined) {
|
||||
error = ''
|
||||
}
|
||||
})
|
||||
|
||||
let inputP: HTMLInputElement | undefined = $state(undefined)
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
@@ -165,7 +174,7 @@
|
||||
meta = newMeta
|
||||
path = metaToPath(meta)
|
||||
} else {
|
||||
meta = pathToMeta(path, hideUser)
|
||||
meta = pathToMeta(path ?? '', hideUser)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user