-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: inability to remove chart filter when dashboard time filter is applied #25217
fix: inability to remove chart filter when dashboard time filter is applied #25217
Conversation
/testenv up |
@yousoph Ephemeral environment spinning up at http://34.209.85.6:8080. Credentials are |
@@ -76,18 +81,24 @@ export const getSlicePayload = ( | |||
// would end up as an extra filter and when overwriting the chart the original | |||
// time range adhoc_filter was lost | |||
if (isEmpty(adhocFilters?.adhoc_filters) && !isEmpty(formDataFromSlice)) { | |||
adhocFilters = extractAddHocFiltersFromFormData(formDataFromSlice); | |||
formDataFromSlice?.adhoc_filters?.forEach(filter => { |
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.
@lilykuang the comment states:
Retain adhoc_filters from the slice if no adhoc_filters are present
but now we're only retaining temporal filters where !isExtra
. Is this correct or do we also need to retain adhoc filters that are not temporal? If this is correct, can you adjust the comment to reflect the change?
Ephemeral environment shutdown and build artifacts deleted. |
…pplied (apache#25217) (cherry picked from commit a9512c1)
SUMMARY
When a chart is added to a dashboard with a time range filter applied, adding an additional filter to the chart in Explore results in an issue where the added filter cannot be removed as expected.
Repro Steps:
Expected Results:
The state filter should be removable from the chart after the second overwrite in step 5.
Actual Results:
Unfortunately, the state filter still persists, and it cannot be removed as expected.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
![filter](https://private-user-images.githubusercontent.com/5705598/266173187-4c7ebe00-28ce-44da-bc42-c78d245d4fff.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTA4NTksIm5iZiI6MTcyNjEx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MDMwOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTYxZDYwN2FiMzk1NzQ1NjU3YTkwZTgwMGJhOThiZDc5OGNmMjViZjdjM2FiMjI2ZmNiNjUyOWFmZGU0YmUyYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.d8YitDeEI0kqAiRuXFbBIyfj06kM52EsGkqpPopXqUM)
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION