Skip to content

Commit

Permalink
ROCKS-30 MigrationUpdate form all unchecked by default
Browse files Browse the repository at this point in the history
  • Loading branch information
patschilf committed Oct 8, 2024
1 parent d2b441c commit 884a0c7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/layers/base/components/Form/MigrationItemUpdate.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<template>
<EntityForm @save="onSave" @cancel="$emit(`cancel`)">
<EntityForm
@save="onSave"
@cancel="$emit(`cancel`)"
>
<TwFormField label="Fields">
<PvMultipleChoice v-model="fields" :options="options" />
<PvMultipleChoice
v-model="fields"
:options="options"
/>
</TwFormField>
</EntityForm>
</template>
Expand All @@ -19,7 +25,7 @@ const emits = defineEmits<{
cancel: []
}>()
const fields = ref<Record<string, boolean>>(Object.fromEntries(Object.keys(props.item.data).map(field => [field, true])))
const fields = ref<Record<string, boolean>>(Object.fromEntries(Object.keys(props.item.data).map(field => [field, false])))
const options = computed(() => Object.keys(props.item.data)
.filter(k => k !== `self`)
.filter((k, index) => props.sourceIDField ? k !== props.sourceIDField : index > 0)
Expand Down

0 comments on commit 884a0c7

Please sign in to comment.