rusackas commented on a change in pull request #11964:
URL:
https://github.com/apache/incubator-superset/pull/11964#discussion_r539071503
##########
File path:
superset-frontend/src/dashboard/components/filterscope/FilterScopeModal.tsx
##########
@@ -16,50 +16,56 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from 'react';
-import PropTypes from 'prop-types';
+import React, { RefObject } from 'react';
import { styled } from '@superset-ui/core';
-import ModalTrigger from '../../../components/ModalTrigger';
-import FilterScope from '../../containers/FilterScope';
+import ModalTrigger from 'src/components/ModalTrigger';
+import FilterScope from 'src/dashboard/containers/FilterScope';
-const propTypes = {
- triggerNode: PropTypes.node.isRequired,
+type FilterScopeModalProps = {
+ triggerNode: JSX.Element;
};
const FilterScopeModalBody = styled.div(({ theme: { gridUnit } }) => ({
padding: gridUnit * 2,
paddingBottom: gridUnit * 3,
}));
-export default class FilterScopeModal extends React.PureComponent {
- constructor(props) {
+export default class FilterScopeModal extends React.PureComponent<
+ FilterScopeModalProps,
+ {}
+> {
+ modal: RefObject<ModalTrigger>;
+
+ constructor(props: FilterScopeModalProps) {
super(props);
this.modal = React.createRef();
this.handleCloseModal = this.handleCloseModal.bind(this);
}
- handleCloseModal() {
+ handleCloseModal(): any {
Review comment:
```suggestion
handleCloseModal(): void {
```
----------------------------------------------------------------
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]