Metrics - event props not populating correctly
This commit is contained in:
parent
267e8e39aa
commit
775aa0e92c
|
@ -24,11 +24,7 @@
|
|||
}
|
||||
|
||||
let originalName = field.name
|
||||
|
||||
$: required =
|
||||
field.constraints &&
|
||||
field.constraints.presence &&
|
||||
!field.constraints.presence.allowEmpty
|
||||
$: required = field && field.constraints && field.constraints.presence
|
||||
|
||||
async function saveColumn() {
|
||||
backendUiStore.update(state => {
|
||||
|
@ -50,6 +46,14 @@
|
|||
field.type = type
|
||||
field.constraints = constraints
|
||||
}
|
||||
|
||||
const getPresence = required => (required ? { allowEmpty: false } : false)
|
||||
|
||||
const requiredChanged = ev => {
|
||||
const req = ev.target.checked
|
||||
field.constraints.presence = req ? { allowEmpty: false } : false
|
||||
required = req
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="actions">
|
||||
|
@ -68,10 +72,7 @@
|
|||
<div class="info">
|
||||
<div class="field">
|
||||
<label>Required</label>
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked={required}
|
||||
on:change={() => (field.constraints.presence.allowEmpty = required)} />
|
||||
<input type="checkbox" checked={required} on:change={requiredChanged} />
|
||||
</div>
|
||||
|
||||
{#if field.type === 'string' && field.constraints}
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
})
|
||||
notifier.success(`Table ${name} created successfully.`)
|
||||
$goto(`./model/${model._id}`)
|
||||
analytics.captureEvent("Table Created", { name })
|
||||
name = ""
|
||||
dropdown.hide()
|
||||
analytics.captureEvent("Table Created", { name })
|
||||
}
|
||||
|
||||
const onClosed = () => {
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
})
|
||||
const appJson = await appResp.json()
|
||||
analytics.captureEvent("App Created", {
|
||||
name,
|
||||
name: $createAppStore.values.applicationName,
|
||||
appId: appJson._id,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue