Antonio-RiveroMartnez commented on code in PR #34523:
URL: https://github.com/apache/superset/pull/34523#discussion_r2288967789
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx:
##########
@@ -695,6 +685,23 @@ const config: ControlPanelConfig = {
)
? (explore?.datasource as Dataset)?.verbose_map
: (explore?.datasource?.columns ?? {});
+
+ // Only show increase/decrease color options when time
comparison is active
+ const hasTimeComparison = !isEmpty(
Review Comment:
nit: I know is not fault of this PR, but I see we are telling whether it has
time comparison or not in several parts of this file and using each its own
approach or duplicating, probably good to have a helper method we can invoke
and reuse?
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx:
##########
@@ -695,6 +685,23 @@ const config: ControlPanelConfig = {
)
? (explore?.datasource as Dataset)?.verbose_map
: (explore?.datasource?.columns ?? {});
+
+ // Only show increase/decrease color options when time
comparison is active
+ const hasTimeComparison = !isEmpty(
Review Comment:
Should this check for `explore?.controls?.time_compare?.value` like
[columnOptions](https://github.com/apache/superset/blob/2029fd013105611e965015268c4f212a9441e59e/superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx#L722)
does?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]