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(cross-filters): Make chart emitting cross-filter exclude itself from filtering #14046

Merged
merged 1 commit into from
Apr 12, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const getAllActiveFilters = ({
const scope = nativeFilters?.[filterId]?.scope ??
chartConfiguration?.[filterId]?.crossFilters?.scope ?? {
rootPath: [DASHBOARD_ROOT_ID],
excluded: [],
excluded: [filterId],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there risk that chartConfiguration[filterId].crossFilters.scope.excluded == [], in which case the filter won't exclude itself?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't encountered such case. It's either an empty object or an array with a chart ID.

};
// Iterate over all roots to find all affected charts
scope.rootPath.forEach(layoutItemId => {
Expand Down