Skip to content

Commit

Permalink
[BI-1127] remove delete button for minimum categories
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeidlin committed Oct 28, 2021
1 parent 16d9030 commit eac9b89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/components/trait/forms/CategoryTraitForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
v-on:value-change="item.value = $event"
v-on:label-change="item.label = $event"
v-bind:key="i"
v-bind:can-be-removed="i > 1"
v-bind:server-row-validation="getCategoryErrors(i)"
/>
</template>
Expand All @@ -68,6 +69,7 @@
v-on:value-change="item.value = $event"
v-bind:value-placeholder="nominalPlaceholders[i]"
v-bind:key="i"
v-bind:can-be-removed="i > 0"
v-bind:server-row-validation="getCategoryErrors(i)"
/>
</template>
Expand Down
4 changes: 3 additions & 1 deletion src/components/trait/forms/LabelValueRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/>
</div>
<div class="column is-one-fifth ml-2">
<button type="button" class="delete mt-4" v-on:click="$emit('delete')"></button>
<button v-show="canBeRemoved" type="button" class="delete mt-4" v-on:click="$emit('delete')"></button>
</div>

</div>
Expand Down Expand Up @@ -80,6 +80,8 @@ export default class LabelValueRow extends Vue {
categoryPlaceholder: string | undefined;
@Prop()
serverRowValidation!: RowError;
@Prop()
canBeRemoved!: boolean;
}

</script>
4 changes: 3 additions & 1 deletion src/components/trait/forms/ValueRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/>
</div>
<div class="column is-one-fifth ml-2">
<button type="button" class="delete" v-on:click="$emit('delete')"></button>
<button v-show="canBeRemoved" type="button" class="delete" v-on:click="$emit('delete')"></button>
</div>
</div>
</div>
Expand All @@ -55,6 +55,8 @@
valuePlaceholder: string | undefined;
@Prop()
serverRowValidation!: RowError;
@Prop()
canBeRemoved!: boolean;
}

</script>

0 comments on commit eac9b89

Please sign in to comment.