villebro commented on code in PR #30393:
URL: https://github.com/apache/superset/pull/30393#discussion_r1775958153
##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx:
##########
@@ -66,10 +67,16 @@ function isForcedCategorical(controls:
ControlStateMapping): boolean {
}
function isSortable(controls: ControlStateMapping): boolean {
+ const xAxisValue = controls?.x_axis?.value as QueryFormColumn;
+ // Given that we don't know the type of a custom SQL column,
+ // we treat it as sortable and give the responsibility to the
+ // user to provide a sortable result.
+ const isCustomSQL = !isPhysicalColumn(xAxisValue);
return (
isForcedCategorical(controls) ||
+ isCustomSQL ||
checkColumnType(
- getColumnLabel(controls?.x_axis?.value as QueryFormColumn),
+ getColumnLabel(xAxisValue),
Review Comment:
Niiice! ❤️
--
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]