Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix URLs breaking on date picker navigation #4323

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/js/dashboard/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function navigateToQuery(history, queryFrom, newData) {
// if we update any data that we store in localstorage, make sure going back in history will
// revert them
if (newData.period && newData.period !== queryFrom.period) {
history.replace({ search: updatedQuery({ period: queryFrom.period}) })
history.replace({ search: updatedQuery({ period: queryFrom.period }) })
}

// then push the new query to the history
Expand Down Expand Up @@ -135,7 +135,7 @@ export function filtersBackwardsCompatibilityRedirect() {
}

function QueryLink(props) {
const {query, history, to, className, children} = props
const { query, history, to, className, children } = props

function onClick(e) {
e.preventDefault()
Expand Down Expand Up @@ -167,7 +167,7 @@ function QueryButton({ history, query, to, disabled, className, children, onClic
event.preventDefault()
navigateToQuery(history, query, to)
if (onClick) onClick(event)
history.push({ pathname: window.location.pathname, search: updatedQuery(to) })
history.push({ search: updatedQuery(to) })
}}
type="button"
disabled={disabled}
Expand Down