You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/27 12:46:51 UTC

[GitHub] [superset] villebro commented on a change in pull request #15864: feat(explore): new datasets have autocomplete filters enabled if UX_BETA is set

villebro commented on a change in pull request #15864:
URL: https://github.com/apache/superset/pull/15864#discussion_r677413033



##########
File path: superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndFilterSelect.tsx
##########
@@ -304,9 +311,14 @@ export const DndFilterSelect = (props: DndFilterSelectProps) => {
         sqlExpression: (droppedItem as AdhocMetric)?.translateToSql(),
       });
     }
-    return new AdhocFilter({
+    const config: Partial<AdhocFilter> = {
       subject: (droppedItem as ColumnMeta)?.column_name,
-    });
+    };
+    if (isFeatureEnabled(FeatureFlag.UX_BETA)) {
+      config.operator = OPERATOR_ENUM_TO_OPERATOR_TYPE[Operators.IN].operation;
+      config.operatorId = Operators.IN;
+    }

Review comment:
       When we drop a non-string column, the UX feels slightly unintuitive (here I dropped the `num` column):
   
   ![image](https://user-images.githubusercontent.com/33317356/127155622-e5226403-35d0-4be5-bf06-242dbb619d4e.png)
   
   Since we have the full set of columns along with their `type_generic`, maybe we could consider having different behavior for numeric and temporal column types while we're at it?




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org