fix: search cache issue
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Breadcrumbs, FormControl, createResource, debounce } from 'frappe-ui'
|
||||
import { Breadcrumbs, FormControl, createResource } from 'frappe-ui'
|
||||
import { ref, computed } from 'vue'
|
||||
import UserAvatar from '@/components/UserAvatar.vue'
|
||||
import { Search } from 'lucide-vue-next'
|
||||
@@ -59,8 +59,7 @@ const participants = createResource({
|
||||
url: 'lms.lms.api.get_certified_participants',
|
||||
method: 'GET',
|
||||
debounce: 300,
|
||||
cache: ['certified_participants', searchQuery.value],
|
||||
makeParams() {
|
||||
makeParams(values) {
|
||||
return {
|
||||
search_query: searchQuery.value,
|
||||
}
|
||||
|
||||
@@ -125,12 +125,11 @@ const searchQuery = ref('')
|
||||
|
||||
const courses = createResource({
|
||||
debounce: 300,
|
||||
makeParams() {
|
||||
makeParams(values) {
|
||||
return {
|
||||
search_query: searchQuery.value,
|
||||
}
|
||||
},
|
||||
cache: ['courses', searchQuery.value, user?.data?.email],
|
||||
url: 'lms.lms.utils.get_courses',
|
||||
auto: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user