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/11/01 23:21:39 UTC

[GitHub] [superset] etr2460 commented on a change in pull request #17315: migrate HiddenControl component from jsx to tsx

etr2460 commented on a change in pull request #17315:
URL: https://github.com/apache/superset/pull/17315#discussion_r740620136



##########
File path: superset-frontend/src/explore/components/controls/HiddenControl.tsx
##########
@@ -17,29 +17,14 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { Input } from 'src/common/components';
 
-const propTypes = {
-  onChange: PropTypes.func,
-  value: PropTypes.oneOfType([
-    PropTypes.string,
-    PropTypes.number,
-    PropTypes.object,
-    PropTypes.bool,
-    PropTypes.array,
-    PropTypes.func,
-  ]),
-};
-
-const defaultProps = {
-  onChange: () => {},
-};
+interface HiddenControlsProps {
+  onChange: () => void;
+  value: string | number | {} | boolean | [] | (() => void);

Review comment:
       I _think_ this should probably be
   
   ```suggestion
     value: string | number | Record<string, any> | boolean | any[] | Function;
   ```




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