From b4714e8740d37f1a3c7e51b60297f03e8b9013f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 23 Mar 2021 14:26:47 +0300 Subject: [PATCH] refactor --- src/views/filterservice/FilterServiceDoc.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/views/filterservice/FilterServiceDoc.vue b/src/views/filterservice/FilterServiceDoc.vue index 65a075363..6fe33138a 100644 --- a/src/views/filterservice/FilterServiceDoc.vue +++ b/src/views/filterservice/FilterServiceDoc.vue @@ -325,8 +325,6 @@ import { ref, onMounted } from 'vue'; import {FilterMatchMode,FilterService} from 'primevue/api'; import CustomerService from './service/CustomerService'; - - export default { setup() { onMounted(() => { @@ -335,7 +333,7 @@ export default { loading.value = false; }); - FilterService.register(YOUR_FILTER, (value, filter) => { + FilterService.register(YOUR_FILTER.value, (value, filter) => { if (filter === undefined || filter === null || filter.trim() === '') { return true; } @@ -352,11 +350,11 @@ export default { const customers = ref(); const customerService = ref(new CustomerService()); const filters = ref({ - 'name': {value: null, matchMode: YOUR_FILTER}, + 'name': {value: null, matchMode: YOUR_FILTER.value}, 'country.name': {value: null, matchMode: FilterMatchMode.STARTS_WITH} }); const matchModeOptions = ref([ - {label: 'Your Equals', value: YOUR_FILTER}, + {label: 'Your Equals', value: YOUR_FILTER.value}, {label: 'Starts With', value: FilterMatchMode.STARTS_WITH} ]); const loading = ref(true);