Skip to content

Commit

Permalink
Fix quota select
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Dec 20, 2022
1 parent 9a012dd commit 3177b8e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/web-pkg/src/components/QuotaSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<div>
<oc-select
ref="select"
v-model="selectedOption"
:modelValue="selectedOption"
@update:modelValue="onUpdate"
:selectable="optionSelectable"
taggable
push-tags
Expand All @@ -11,7 +12,6 @@
:create-option="createOption"
option-label="displayValue"
:label="title"
@option:selected="$emit('selectedOptionChange', selectedOption)"
>
<template #selected-option="{ displayValue, displayUnit }">
<span>{{ displayValue }}</span>
Expand All @@ -35,7 +35,7 @@
</div>
</template>

<script>
<script lang="ts">
export default {
name: 'QuotaSelect',
props: {
Expand Down Expand Up @@ -117,6 +117,10 @@ export default {
this.selectedOption = this.options.find((o) => o.value === this.totalQuota)
},
methods: {
onUpdate(event) {
this.selectedOption = event
this.$emit('selectedOptionChange', this.selectedOption)
},
optionSelectable(option) {
return option.selectable !== false
},
Expand Down

0 comments on commit 3177b8e

Please sign in to comment.