michael-s-molina commented on code in PR #20690:
URL: https://github.com/apache/superset/pull/20690#discussion_r922168290


##########
superset-frontend/src/components/Select/AsyncSelect.tsx:
##########
@@ -299,7 +298,7 @@ const AsyncSelect = (
     filterOption = true,
     header = null,
     invertSelection = false,
-    labelInValue = false,
+    labelInValue = true,

Review Comment:
   Can you remove the `labelInValue` prop from here and `PickedSelectProps`?



##########
superset-frontend/src/components/Select/AsyncSelect.tsx:
##########
@@ -322,9 +321,8 @@ const AsyncSelect = (
   }: AsyncSelectProps,
   ref: RefObject<AsyncSelectRef>,
 ) => {
-  const isAsync = typeof options === 'function';
   const isSingleMode = mode === 'single';
-  const shouldShowSearch = isAsync || allowNewOptions ? true : showSearch;
+  const shouldShowSearch = allowNewOptions ? true : showSearch;

Review Comment:
   We can remove `shouldShowSearch` and use only `showSearch` because the 
previous logic ignored the `allowNewOptions` if it was async. `showSearch` is 
true by default.



##########
superset-frontend/src/components/Select/AsyncSelect.tsx:
##########
@@ -706,13 +692,13 @@ const AsyncSelect = (
         getPopupContainer={
           getPopupContainer || (triggerNode => triggerNode.parentNode)
         }
-        labelInValue={isAsync || labelInValue}
+        labelInValue={labelInValue}

Review Comment:
   ```suggestion
           labelInValue
   ```



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

Reply via email to