Prevent datetime and boolean fields showing in workflow block setup until these are handled properly

This commit is contained in:
Andrew Kingston 2020-09-18 16:14:37 +01:00
parent f906ce0a83
commit af2bdd2db7
1 changed files with 2 additions and 13 deletions

View File

@ -12,17 +12,6 @@
// Ensure any nullish modelId values get set to empty string so
// that the select works
$: 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>
<div class="block-field">
@ -49,12 +38,12 @@
<option value={option}>{option}</option>
{/each}
</Select>
{:else}
{:else if schema.type === "string"}
<BindableInput
thin
bind:value={value[field]}
on:change={e => setParsedValue(e, field)}
label={field}
type={schema.type}
{bindings} />
{/if}
</div>