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/12/03 04:39:53 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #11911: fix: adjust width for non multi select inputs

etr2460 commented on a change in pull request #11911:
URL: https://github.com/apache/incubator-superset/pull/11911#discussion_r534662880



##########
File path: superset-frontend/src/components/Select/styles.tsx
##########
@@ -257,12 +257,14 @@ export const DEFAULT_STYLES: PartialStylesConfig = {
   ],
 };
 
-const inputTagStyles = {
-  background: 'none',
-  border: 'none',
-  outline: 'none',
-  padding: 0,
-  width: '100%',
+const inputTagStyles = (isMultiWithValue: boolean | undefined) => {
+  const styles = {
+    background: 'none',
+    border: 'none',
+    outline: 'none',
+    padding: 0,
+  };

Review comment:
       perhaps this object should be defined as a const as INPUT_TAG_STYLES?
   
   Then you could get rid of the function entirely and just do:
   ```tsx
   inputStyle={isMultiWithValue ? { ...INPUT_TAG_STYLES, width: '100%' } : INPUT_TAG_STYLES}
   ```
   on line 335




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