Skip to content

Commit

Permalink
Fix sonar issues about prop validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Andre Azevedo Quirino committed Oct 1, 2024
1 parent a063bbd commit 44f08b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, useRef } from "react";
import PropTypes from "prop-types";
import { IconButton, InputAdornment, TextField } from "@material-ui/core";
import { SCOPES } from "../../../utils/Constants";
import { SelectScopeModal } from "@mov-ai/mov-fe-lib-react";
Expand Down Expand Up @@ -81,4 +82,14 @@ const ConfigurationSelector = props => {
);
};

ConfigurationSelector.propTypes = {
rowProps: {
disabled: PropTypes.bool,
onChange: PropTypes.func,
rowData: PropTypes.shape({
value: PropTypes.string,
}),
},
}

export default ConfigurationSelector;
9 changes: 8 additions & 1 deletion src/editors/_shared/KeyValueTable/KeyValueEditorDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,14 @@ KeyValueEditorDialog.propTypes = {
renderValueEditor: PropTypes.func,
renderCustomContent: PropTypes.func,
nameValidation: PropTypes.func,
valueValidation: PropTypes.func
valueValidation: PropTypes.func,
setData: PropTypes.func,
data: PropTypes.shape({
name: PropTypes.string,
description: PropTypes.string,
value: PropTypes.string,
defaultValue: PropTypes.string,
}),
};

//The function returns true when the compared props equal, preventing the component from re-rendering
Expand Down

0 comments on commit 44f08b2

Please sign in to comment.