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 2020/10/22 00:28:57 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #11289: feat: keep placeholder on multiselect

ktmud commented on a change in pull request #11289:
URL: https://github.com/apache/incubator-superset/pull/11289#discussion_r509810596



##########
File path: superset-frontend/src/components/Select/styles.tsx
##########
@@ -241,9 +242,42 @@ export const DEFAULT_STYLES: PartialStylesConfig = {
   }),
 };
 
-const { ClearIndicator, DropdownIndicator, Option } = defaultComponents;
+const multiInputStyle = css`
+  padding: 0 6px;
+  vertical-align: middle;
+`;
 
-export const DEFAULT_COMPONENTS: SelectComponentsConfig<any> = {
+type SelectComponentsType = Omit<SelectComponentsConfig<any>, 'Input'> & {
+  Input: ComponentType<InputProps>;
+};
+
+// react-select is missing selectProps from their props type
+// so overwriting it here to avoid errors
+type InputProps = {
+  selectProps: {
+    isMulti: boolean;
+    value: {
+      length: number;
+    };
+    placeholder: string;
+  };
+  cx: (a: string | null, b: any, c: string) => string | void;

Review comment:
       Can you try if this works?
   
   ```typescript
   import { InputProps as ReactSelectInputProps } from 'react-select';
   
   type InputProps = ReactSelectInputProps & {
     placeholder?: string;
     selectProps?: CommonProps<any>['selectProps'];
   }
   ```




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

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