Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

89
Views
how to replace a specific query param in inertia vue?

I m trying to create a searchable list in a edit screen of my project. its laravel inertia vue project. i'm using this.$inertia.get() function and i want to filter some data according to my query param. filtering is working as i expected. but i want to hide that query param from the url.

for an example:

http://my-site.test/shows/2.

and i have tried these codes for get results.

this.$inertia.get(route('shows.edit', {id: 2, _query: {term: event.target.value}}, {replace:  true}), {}, {preserveState: true});

and

this.$inertia.get('/shows/2/', {term: event.target.value}, {preserveState: true, replace: true});

But none of these are worked as i expected. When i search something in the search field my address bar changes like this:

http://my-site.test/shows/2?term=dfgddfg

But i don't want to stay the term param in browser history. Is there a way to replace only the term param.

I followed below youtube video to get a reference.

Create a searchable select field with Laravel, InertiaJS and vue-multiselect

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs