Fix Import Validations
This commit is contained in:
parent
53eb509edc
commit
c6cd8c1c1e
1 changed files with 7 additions and 2 deletions
|
@ -94,6 +94,11 @@
|
||||||
|
|
||||||
validateHash = newValidateHash
|
validateHash = newValidateHash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleChange = (name, e) => {
|
||||||
|
schema[name].type = e.detail
|
||||||
|
schema[name].constraints = FIELDS[e.detail.toUpperCase()].constraints
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="dropzone">
|
<div class="dropzone">
|
||||||
|
@ -118,12 +123,12 @@
|
||||||
</div>
|
</div>
|
||||||
{#if rows.length > 0 && !error}
|
{#if rows.length > 0 && !error}
|
||||||
<div class="schema-fields">
|
<div class="schema-fields">
|
||||||
{#each Object.values(schema) as column}
|
{#each Object.entries(schema) as [name, column]}
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<span>{column.name}</span>
|
<span>{column.name}</span>
|
||||||
<Select
|
<Select
|
||||||
bind:value={column.type}
|
bind:value={column.type}
|
||||||
on:change={e => (column.type = e.detail)}
|
on:change={e => handleChange(name, e)}
|
||||||
options={typeOptions}
|
options={typeOptions}
|
||||||
placeholder={null}
|
placeholder={null}
|
||||||
getOptionLabel={option => option.label}
|
getOptionLabel={option => option.label}
|
||||||
|
|
Loading…
Reference in a new issue