Revert changes to listSearch component

This commit is contained in:
kolaente 2021-07-17 22:02:49 +02:00
parent 894cf6c3f8
commit 8a3fe5daa2
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -20,6 +20,7 @@
<script> <script>
import ListService from '../../../services/list' import ListService from '../../../services/list'
import ListModel from '../../../models/list'
import Multiselect from '@/components/input/multiselect' import Multiselect from '@/components/input/multiselect'
export default { export default {
@ -27,19 +28,16 @@ export default {
data() { data() {
return { return {
listSerivce: ListService, listSerivce: ListService,
list: ListModel,
foundLists: [], foundLists: [],
} }
}, },
components: { components: {
Multiselect, Multiselect,
}, },
prop: ['list'],
model: {
prop: 'list',
event: 'selected',
},
beforeMount() { beforeMount() {
this.listService = new ListService() this.listSerivce = new ListService()
this.list = new ListModel()
}, },
methods: { methods: {
findLists(query) { findLists(query) {
@ -48,10 +46,9 @@ export default {
return return
} }
this.listService.getAll({}, {s: query}) this.listSerivce.getAll({}, {s: query})
.then(response => { .then(response => {
this.$set(this, 'foundLists', response) this.$set(this, 'foundLists', response)
this.$set(this, 'list', response)
}) })
.catch(e => { .catch(e => {
this.error(e) this.error(e)
@ -70,9 +67,6 @@ export default {
} }
return this.$t('list.shared') return this.$t('list.shared')
}, },
handleInput (value) {
this.$emit('selected', value)
},
}, },
} }
</script> </script>