diff --git a/src/dispatch/static/dispatch/components.d.ts b/src/dispatch/static/dispatch/components.d.ts
index 5f5c864db1f8..499299563ebe 100644
--- a/src/dispatch/static/dispatch/components.d.ts
+++ b/src/dispatch/static/dispatch/components.d.ts
@@ -26,6 +26,7 @@ declare module '@vue/runtime-core' {
MonacoEditor: typeof import('./src/components/MonacoEditor.vue')['default']
NotificationSnackbarsWrapper: typeof import('./src/components/NotificationSnackbarsWrapper.vue')['default']
PageHeader: typeof import('./src/components/PageHeader.vue')['default']
+ ParticipantAutoComplete: typeof import('./src/components/ParticipantAutoComplete.vue')['default']
ParticipantSelect: typeof import('./src/components/ParticipantSelect.vue')['default']
ProjectAutoComplete: typeof import('./src/components/ProjectAutoComplete.vue')['default']
Refresh: typeof import('./src/components/Refresh.vue')['default']
diff --git a/src/dispatch/static/dispatch/src/components/AutoComplete.vue b/src/dispatch/static/dispatch/src/components/AutoComplete.vue
index 912cd93d0842..bfdfcf1d7f87 100644
--- a/src/dispatch/static/dispatch/src/components/AutoComplete.vue
+++ b/src/dispatch/static/dispatch/src/components/AutoComplete.vue
@@ -10,7 +10,7 @@
:hide-no-data="false"
v-model:search="search"
v-model="selectedModel"
- @update:modelValue="handleClear"
+ @update:model-value="handleClear"
>
@@ -21,11 +21,7 @@
-
+
@@ -72,7 +68,7 @@ export default {
},
emits: ["update:modelValue"],
setup(props, { emit }) {
- const { resource, title, identifier, subtitle, label, modelValue } = toRefs(props)
+ const { resource, modelValue } = toRefs(props)
let loading = ref(false)
let items = ref([])
@@ -80,7 +76,7 @@ export default {
let currentPage = ref(1)
let total = ref(0)
let selectedModel = ref(modelValue.value)
- let search = ref(modelValue.value ? modelValue.value[title.value] : "")
+ let search = ref(modelValue.value ? modelValue.value[props.title.value] : "")
let debouncedGetData = debounce((searchVal, page = currentPage.value) => {
loading.value = true
@@ -130,18 +126,21 @@ export default {
emit(
"update:modelValue",
newVal
- ? items.value.find((item) => item[identifier.value] == newVal[identifier.value])
+ ? items.value.find(
+ (item) => item[props.identifier.value] == newVal[props.identifier.value]
+ )
: null
)
})
+ watch(modelValue, (newValue) => {
+ selectedModel.value = newValue
+ search.value = newValue ? newValue[props.title] : ""
+ })
+
return {
initials,
items,
- label,
- title,
- identifier,
- subtitle,
loading,
handleClear,
loadMore,
diff --git a/src/dispatch/static/dispatch/src/components/ParticipantSelect.vue b/src/dispatch/static/dispatch/src/components/ParticipantSelect.vue
index f7fc562aae18..a4ff901b074c 100644
--- a/src/dispatch/static/dispatch/src/components/ParticipantSelect.vue
+++ b/src/dispatch/static/dispatch/src/components/ParticipantSelect.vue
@@ -1,7 +1,7 @@
@@ -41,7 +41,7 @@