Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<template>
<div id="search-projects">
<input
v-model="text"
type="search"
placeholder="Rechercher..."
>
</div>
</template>
<script>
import _ from 'lodash';
export default {
name: 'SearchProjects',
components: {
},
data() {
return {
text: null
}
},
watch: {
text: _.debounce(function(newValue) {
this.$emit('loading', true);
this.SET_CURRENT_PAGE(1);
this.searchFunction({ text: newValue, types: [] })
.then(() => {
this.$emit('loading', false);
});
}, 100)
},
methods: {
}
}
</script>
<style lang="less" scoped>
#search-projects {