I have been using router.replace method to add the params in my existing url. But the page is getting refreshed and my settings ( setting a value in the dropdown) getting reset. Any solution for this?
I have tried router.replace method and history.replace method.
Use this router.push()
// literal string path router.push('/users/eduardo')
// object with path router.push({ path: '/users/eduardo' })
// named route with params to let the router build the url router.push({ name: 'user', params: { username: 'eduardo' } })
// with query, resulting in /register?plan=private router.push({ path: '/register', query: { plan: 'private' } })
// with hash, resulting in /about#team router.push({ path: '/about', hash: '#team' })
enter link description here