Prevent datetime and boolean fields showing in workflow block setup until these are handled properly
This commit is contained in:
parent
68c84438da
commit
aa05718766
|
@ -12,17 +12,6 @@
|
||||||
// Ensure any nullish modelId values get set to empty string so
|
// Ensure any nullish modelId values get set to empty string so
|
||||||
// that the select works
|
// that the select works
|
||||||
$: if (value?.modelId == null) value = { modelId: "" }
|
$: if (value?.modelId == null) value = { modelId: "" }
|
||||||
|
|
||||||
function setParsedValue(evt, field) {
|
|
||||||
const fieldSchema = model?.schema[field]
|
|
||||||
if (fieldSchema) {
|
|
||||||
if (fieldSchema.type === "number") {
|
|
||||||
value[field] = parseInt(evt.target.value)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
value[field] = evt.target.value
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="block-field">
|
<div class="block-field">
|
||||||
|
@ -49,12 +38,12 @@
|
||||||
<option value={option}>{option}</option>
|
<option value={option}>{option}</option>
|
||||||
{/each}
|
{/each}
|
||||||
</Select>
|
</Select>
|
||||||
{:else}
|
{:else if schema.type === "string"}
|
||||||
<BindableInput
|
<BindableInput
|
||||||
thin
|
thin
|
||||||
bind:value={value[field]}
|
bind:value={value[field]}
|
||||||
on:change={e => setParsedValue(e, field)}
|
|
||||||
label={field}
|
label={field}
|
||||||
|
type={schema.type}
|
||||||
{bindings} />
|
{bindings} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue