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/03/12 18:31:12 UTC

[GitHub] [incubator-superset] asif-ir commented on a change in pull request #9291: [SIP-36] Migrate RunQueryActionButton.jsx to RunQueryActionButton.tsx…

asif-ir commented on a change in pull request #9291: [SIP-36] Migrate RunQueryActionButton.jsx to RunQueryActionButton.tsx…
URL: https://github.com/apache/incubator-superset/pull/9291#discussion_r391814478
 
 

 ##########
 File path: superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
 ##########
 @@ -17,53 +17,57 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { t } from '@superset-ui/translation';
 
 import Button from '../../components/Button';
 
-const propTypes = {
-  allowAsync: PropTypes.bool.isRequired,
-  dbId: PropTypes.number,
-  queryState: PropTypes.string,
-  runQuery: PropTypes.func.isRequired,
-  selectedText: PropTypes.string,
-  stopQuery: PropTypes.func.isRequired,
-  sql: PropTypes.string.isRequired,
-};
-const defaultProps = {
-  allowAsync: false,
-  sql: '',
-};
+interface Props {
+  allowAsync: boolean;
+  dbId: number | null;
+  queryState: string;
 
 Review comment:
   Didn't change this one since queryState is being using in _indexOf_ few lines below which gets type-angry if you feed *undefined* to it.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org