Skip to content

Commit

Permalink
Work for #7337: vue2: fix dropdown throws errors when setting data (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Nov 14, 2023
1 parent 4bdd5d5 commit bda8a36
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/vue/components/dropdown/dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

<div :class="question.cssClasses.controlValue">
<survey-string
v-if="question.showSelectedItemLocText"
:locString="question.selectedItemLocText"
v-if="showSelectedItemLocText"
:locString="selectedItemLocText"
/>
<div v-if="model.showHintString" :class="question.cssClasses.hintSuffix">
<span style="visibility: hidden">{{ model.inputStringRendered }}</span>
Expand Down Expand Up @@ -82,8 +82,8 @@
></sv-popup>
<div disabled v-else :id="question.inputId" :class="question.getControlClass()">
<survey-string
v-if="question.selectedItemLocText"
:locString="question.selectedItemLocText"
v-if="selectedItemLocText"
:locString="selectedItemLocText"
/>
<div>{{ question.readOnlyText }}</div>
</div>
Expand Down Expand Up @@ -128,6 +128,14 @@ export class DropdownComponent extends BaseVue {
this.model.inputStringRendered = event.target.value;
}
public get showSelectedItemLocText() {
return this.question.showSelectedItemLocText;
}
public get selectedItemLocText() {
return this.question.selectedItemLocText;
}
public click(event: any) {
this.model?.onClick(event);
}
Expand Down

0 comments on commit bda8a36

Please sign in to comment.