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 13:53:59 UTC

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

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



##########
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:
       good idea! it would be great to have the numeric slider in adhoc filter eventually when we redesign the entire component. 
   For temporal columns, i doubt users would use adhoc filter for it. 
   For numeric, we can use "=" or "<"? either way, the preselection is not gonna trigger any query, or adding additional clicks to selection, so the change is harmless. it really depends on what our best guess is without further data.  




-- 
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