Fix basepath routing dashboards
parent
6376673fcb
commit
92ac98420a
|
@ -17,6 +17,7 @@ import {hydrateTemplate, isTemplateNested} from 'src/tempVars/apis'
|
|||
|
||||
import {notify} from 'src/shared/actions/notifications'
|
||||
import {errorThrown} from 'src/shared/actions/errors'
|
||||
import {stripPrefix} from 'src/utils/basepath'
|
||||
|
||||
import {
|
||||
applyLocalSelections,
|
||||
|
@ -364,6 +365,7 @@ export const setActiveCell = (activeCellID: string): SetActiveCellAction => ({
|
|||
|
||||
export const updateQueryParams = (updatedQueryParams: object): RouterAction => {
|
||||
const {search, pathname} = window.location
|
||||
const strippedPathname = stripPrefix(pathname)
|
||||
|
||||
const newQueryParams = _.pickBy(
|
||||
{
|
||||
|
@ -374,7 +376,7 @@ export const updateQueryParams = (updatedQueryParams: object): RouterAction => {
|
|||
)
|
||||
|
||||
const newSearch = qs.stringify(newQueryParams)
|
||||
const newLocation = {pathname, search: `?${newSearch}`}
|
||||
const newLocation = {pathname: strippedPathname, search: `?${newSearch}`}
|
||||
|
||||
return replace(newLocation)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue