-
Notifications
You must be signed in to change notification settings - Fork 1
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: chart click nav #97
Conversation
src/js/components/Search/Search.tsx
Outdated
@@ -61,6 +65,10 @@ const RoutedSearch: React.FC = () => { | |||
const queryParam = new URLSearchParams(location.search); | |||
const { valid, validQueryParamsObject } = validateQuery(queryParam); | |||
if (valid) { | |||
console.log({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to a console.debug with some kind of info about whats being logged, or remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to remove, was only to debug
src/js/components/Search/Search.tsx
Outdated
const qp2Keys = Object.keys(qp2); | ||
const params = [...new Set([...qp1Keys, ...qp2Keys])]; | ||
return params.reduce((acc, v) => acc && qp1[v] === qp2[v], true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return to original form to reduce diff? or is it better as not a one-liner...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like one-liners, but in this case I think it is easier to read/debug this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Chart click navigation was failing due to a faulty query parameters check (Search.tsx checkQueryParamsEqual).
Given the parameter "age", the function would spread each letter as its own parameter ("a", "g", "e"), causing
undefined === undefined
which evaluates to true always.