Lots of changes

This commit is contained in:
Simon Pocrnjič
2024-11-13 22:11:07 +01:00
parent 90a5858320
commit 953ff38d64
76 changed files with 2822 additions and 427 deletions
+25
View File
@@ -0,0 +1,25 @@
<script setup>
import { debounce } from 'lodash';
import { ref, watch } from 'vue';
import TextInput from '@/Components/TextInput.vue';
import { router } from '@inertiajs/vue3';
const props = defineProps({
options: Object
});
const search = ref(props.options.search)
watch(search, debounce((value) => {
const routeOptions = props.options.route.options ?? null;
router.get(
route(props.options.route.link, routeOptions),
{ search: value },
{ preserveState: true, replace: true }
);
}, 300));
</script>
<template>
<TextInput v-model="search" title="Search" placeholder="Search..." />
</template>