etr2460 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_r391792955
##########
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;
Review comment:
can we make this `dbId?: number` and remove the default dbId?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]