Add hideErrorText prop to CustomThreshold
This commit is contained in:
1 parent
36d2a0aa85
commit
692c79024c
1 file changed
+6
-6
@@ -4,7 +4,6 @@ import Checkbox from "../../../../Components/Inputs/Checkbox";
|
|||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `CustomThreshold` is a functional React component that displays a
|
* `CustomThreshold` is a functional React component that displays a
|
||||||
* group of CheckBox with a label and its correspondant threshold input field.
|
* group of CheckBox with a label and its correspondant threshold input field.
|
||||||
@@ -32,9 +31,8 @@ export const CustomThreshold = ({
|
|||||||
onFieldBlur,
|
onFieldBlur,
|
||||||
alertUnit,
|
alertUnit,
|
||||||
infrastructureMonitor,
|
infrastructureMonitor,
|
||||||
errors
|
errors,
|
||||||
}) =>
|
}) => {
|
||||||
{
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
@@ -42,7 +40,7 @@ export const CustomThreshold = ({
|
|||||||
sx={{
|
sx={{
|
||||||
width: "50%",
|
width: "50%",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
flexWrap: "wrap"
|
flexWrap: "wrap",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box>
|
<Box>
|
||||||
@@ -68,6 +66,7 @@ export const CustomThreshold = ({
|
|||||||
onChange={onFieldChange}
|
onChange={onFieldChange}
|
||||||
error={errors[fieldId]}
|
error={errors[fieldId]}
|
||||||
disabled={!infrastructureMonitor[checkboxId]}
|
disabled={!infrastructureMonitor[checkboxId]}
|
||||||
|
hideErrorText={true}
|
||||||
></Field>
|
></Field>
|
||||||
<Typography
|
<Typography
|
||||||
component="p"
|
component="p"
|
||||||
@@ -77,7 +76,8 @@ export const CustomThreshold = ({
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
);
|
||||||
|
};
|
||||||
|
|
||||||
CustomThreshold.propTypes = {
|
CustomThreshold.propTypes = {
|
||||||
checkboxId: PropTypes.string.isRequired,
|
checkboxId: PropTypes.string.isRequired,
|
||||||
|
|||||||
Reference in new issue
Block a user