feat(dashboards): Persist global filters in dashboard details and url params#101257
Conversation
a95eb83 to
a744a0d
Compare
c68eac4 to
5266153
Compare
5266153 to
cbb5521
Compare
nikkikapadia
left a comment
There was a problem hiding this comment.
lgtm! just a couple clarifying questions before i approve
| filterParams[DashboardFilterKeys.RELEASE] = activeFilters[DashboardFilterKeys.RELEASE] | ||
| ?.length | ||
| ? activeFilters[DashboardFilterKeys.RELEASE] | ||
| : ['']; |
There was a problem hiding this comment.
why are we changing the release type here? just curious it's not an issue
There was a problem hiding this comment.
setting the release param to '' or [''] does the same thing so its just to avoid the unnecessary eslint disable comment
| // Ignore location.query dependency to avoid reading query params when possible (and instead use local state) | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| }, [filters]); |
There was a problem hiding this comment.
why would location.query be a dependency here? it's not being used in the memo 🤔
There was a problem hiding this comment.
good catch! it used to be a dependency then I made a change to use a helper instead and forgot to update it. I removed the memo entirely for now since I would need to update state handling for releases for this to work as intended
…oid updating url filters if no changes
454bf6c to
5c2134f
Compare
Fixes DAIN-980