SSH info in connection refactor - do not save default values

This commit is contained in:
Jan Prochazka
2024-07-10 16:29:05 +02:00
parent cb0a11fda9
commit 8f0b44ade9
5 changed files with 26 additions and 12 deletions

View File

@@ -10,6 +10,7 @@
export let options;
export let isClearable = false;
export let selectFieldComponent = SelectField;
export let defaultSelectValue;
const { values, setFieldValue } = getFormContext();
</script>
@@ -17,7 +18,7 @@
<svelte:component
this={selectFieldComponent}
{...$$restProps}
value={$values && $values[name]}
value={($values && $values[name]) || defaultSelectValue}
options={_.compact(options)}
on:change={e => {
setFieldValue(name, e.detail);