Skip to content

Commit

Permalink
fix(explore): make SORT-Descending visible if Sort-by has value (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ authored and bwang221 committed Feb 10, 2022
1 parent 22474e4 commit 82f4d46
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ export const timeSeriesSection: ControlPanelSectionConfig[] = [
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const config: ControlPanelConfig = {
label: t('Sort Descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
],
Expand Down
2 changes: 2 additions & 0 deletions superset-frontend/src/explore/controlPanels/sections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ export const NVD3TimeSeries: ControlPanelSectionConfig[] = [
label: t('Sort descending'),
default: true,
description: t('Whether to sort descending or ascending'),
visibility: ({ controls }) =>
Boolean(controls?.timeseries_limit_metric.value),
},
},
{
Expand Down

0 comments on commit 82f4d46

Please sign in to comment.