erikbocks commented on code in PR #14225:
URL: https://github.com/apache/cloudstack/pull/14225#discussion_r4771500632


##########
ui/src/components/widgets/InfiniteScrollSelect.vue:
##########
@@ -332,8 +350,7 @@ export default {
       if (firstOption) {
         const firstValue = firstOption[this.optionValueKey]
         this.hasAutoSelectedFirst = true
-        this.$emit('change-option-value', firstValue)
-        this.$emit('change-option', firstOption)
+        this.onChange(firstValue)
       }

Review Comment:
   In the current flow, auto-selection is skipped while 
`preselectedOptionValue` is set, and the preselection state is reset before 
auto-selection runs. Calling `onChange()` also needs to emit `update:value` so 
the parent’s v-model reflects the selection. I don’t think a separate emission 
helper or skip-reset parameter is needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to