mirror of
https://github.com/apache/superset.git
synced 2026-05-12 03:15:55 +00:00
fix: Time range filter applied on a dashboard is not persisting to the chart explore (#22920)
This commit is contained in:
committed by
GitHub
parent
30abefb519
commit
e9423c3c87
@@ -48,6 +48,14 @@ const getExploreFormData = (overrides: JsonObject = {}) => ({
|
||||
sqlExpression: "city = 'Warsaw'",
|
||||
filterOptionName: '567',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE' as const,
|
||||
expressionType: 'SIMPLE' as const,
|
||||
operator: 'TEMPORAL_RANGE' as const,
|
||||
subject: 'ds',
|
||||
comparator: 'No filter',
|
||||
filterOptionName: '678',
|
||||
},
|
||||
],
|
||||
adhoc_filters_b: [
|
||||
{
|
||||
@@ -158,6 +166,14 @@ const getExpectedResultFormData = (overrides: JsonObject = {}) => ({
|
||||
sqlExpression: "city = 'Warsaw'",
|
||||
filterOptionName: '567',
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
operator: 'TEMPORAL_RANGE',
|
||||
subject: 'ds',
|
||||
comparator: 'Last month',
|
||||
filterOptionName: expect.any(String),
|
||||
},
|
||||
{
|
||||
clause: 'WHERE',
|
||||
expressionType: 'SIMPLE',
|
||||
@@ -279,7 +295,7 @@ const getExpectedResultFormData = (overrides: JsonObject = {}) => ({
|
||||
...overrides,
|
||||
});
|
||||
|
||||
it('merges dashboard context form data with explore form data', () => {
|
||||
test('merges dashboard context form data with explore form data', () => {
|
||||
const fullFormData = getFormDataWithDashboardContext(
|
||||
getExploreFormData(),
|
||||
getDashboardFormData(),
|
||||
|
||||
Reference in New Issue
Block a user