eschutho commented on a change in pull request #13563:
URL: https://github.com/apache/superset/pull/13563#discussion_r593382690
##########
File path: superset-frontend/src/SqlLab/components/TemplateParamsEditor.tsx
##########
@@ -26,34 +25,32 @@ import { debounce } from 'lodash';
import ModalTrigger from 'src/components/ModalTrigger';
import { ConfigEditor } from 'src/components/AsyncAceEditor';
import { FAST_DEBOUNCE } from 'src/constants';
-
-const propTypes = {
- onChange: PropTypes.func,
- code: PropTypes.string,
- language: PropTypes.oneOf(['yaml', 'json']),
-};
-
-const defaultProps = {
- onChange: () => {},
- code: '{}',
-};
+import { Tooltip } from 'src/common/components/Tooltip';
const StyledConfigEditor = styled(ConfigEditor)`
&.ace_editor {
border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
}
`;
-function TemplateParamsEditor({ code, language, onChange }) {
- const [parsedJSON, setParsedJSON] = useState();
+function TemplateParamsEditor({
+ code = '{}',
+ language,
+ onChange = () => {},
+}: {
+ code: string;
+ language: 'yaml' | 'json';
+ onChange: (...args: any) => any;
Review comment:
We should be getting to it soon, and then, yes we'll be able to manage
types of props better, ya!
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]