Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss committed Nov 2, 2023
1 parent 7c475b6 commit 7cb7af4
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/dispatch/static/dispatch/src/components/ParticipantSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
item-title="individual.name"
no-filter
return-object
chips
v-model="participant"
@update:model-value="handleClear"
@update:modelValue="handleClear"

Check warning on line 14 in src/dispatch/static/dispatch/src/components/ParticipantSelect.vue

View workflow job for this annotation

GitHub Actions / build

v-on event '@update:modelValue' must be hyphenated
>
<template #no-data>
<v-list-item>
Expand All @@ -29,14 +30,12 @@
<v-list-item-subtitle> Load More </v-list-item-subtitle>
</v-list-item>
</template>
<template #selection="data">
<v-chip pill size="small">
<template #chip="data">
<v-chip v-bind="data.props" pill>
<template #prepend>
<v-avatar color="teal" start>
{{ initials(data.item.raw.individual.name) }}
</v-avatar>
<v-avatar color="teal" start> {{ initials(data.item.title) }} </v-avatar>
</template>
{{ data.item.raw.individual.name }}
{{ data.item.title }}
</v-chip>
</template>
</v-combobox>
Expand Down Expand Up @@ -96,10 +95,10 @@ export default {
onMounted(() => {
debouncedGetIndividualData = debounce(getIndividualData, 300)
if (this.initialValue && this.initialValue.id) {
this.participant = { ...this.initialValue }
if (props.initialValue && props.initialValue.id) {
participant = { ...props.initialValue }

Check failure on line 99 in src/dispatch/static/dispatch/src/components/ParticipantSelect.vue

View workflow job for this annotation

GitHub Actions / build

Must use `.value` to read or write the value wrapped by `ref()`
search = props.initialValue.name

Check failure on line 100 in src/dispatch/static/dispatch/src/components/ParticipantSelect.vue

View workflow job for this annotation

GitHub Actions / build

'search' is constant

Check failure on line 100 in src/dispatch/static/dispatch/src/components/ParticipantSelect.vue

View workflow job for this annotation

GitHub Actions / build

Must use `.value` to read or write the value wrapped by `ref()`
}
debouncedGetIndividualData()
})
const loadMore = async () => {
Expand All @@ -109,7 +108,6 @@ export default {
}
const handleClear = (newValue) => {
console.log("handleClear", newValue)
if (!newValue) {
items.value = []
search.value = null
Expand All @@ -120,7 +118,6 @@ export default {
}
watch(search, async (newVal, oldVal) => {
console.log("watch search", newVal, oldVal)
if (oldVal !== newVal) {
numItems.value = 10
await debouncedGetIndividualData(newVal)
Expand All @@ -132,7 +129,6 @@ export default {
handleClear,
initials,
items,
labelProp,
loading,
loadMore,
participant,
Expand Down

0 comments on commit 7cb7af4

Please sign in to comment.