Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shivamyadav's avatar

Hitting the same request 3 times everytime search changes?

my composable ..

my filter composable

and here is my app layout that has the search input (but i have 2 search for mobile and desktop)

  <!-- Desktop Search -->
                    <input
                        v-model="search"
                        type="search"
                        placeholder="Search..."
                        class="hidden lg:block border-white border font-medium rounded-lg text-black text-sm px-4 py-2"
                    />

//script setup // only related to search 
import { ref, watch } from "vue";
import { Link, usePage, router } from "@inertiajs/vue3";
import { ChevronDown, ChevronUp, PanelRightClose } from "lucide-vue-next";
import { useFilmFilters } from "../composables/useFilmFilters";
const page = usePage();
const { search, allGenres } = useFilmFilters();

const selectedGenre = ref(page.props.genre || null);
const openSearch = ref(false);
const isOpen = ref(false);
const isGenreDropdownOpen = ref(false);


0 likes
0 replies

Please or to participate in this conversation.