Damans227 commented on a change in pull request #17474:
URL: https://github.com/apache/superset/pull/17474#discussion_r758382850
##########
File path: superset-frontend/src/CRUD/Fieldset.tsx
##########
@@ -17,31 +17,33 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import { Form } from 'src/components/Form';
import { recurseReactClone } from './utils';
import Field from './Field';
-const propTypes = {
- children: PropTypes.node.isRequired,
- onChange: PropTypes.func,
- item: PropTypes.object,
- title: PropTypes.node,
- compact: PropTypes.bool,
-};
-const defaultProps = {
- compact: false,
- title: null,
-};
+interface FieldsetProps {
+ children: React.ReactNode;
+ onChange: Function;
+ item: Record<string, any>;
Review comment:
The `datasource` prop has a required object type declared in the
`DatasourceEditor` component on line 366:
```
const propTypes = {
datasource: PropTypes.object.isRequired,
...
```
So, I guess ` item: Record<string, any>;` is ok in this case. Lemme know.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]