feat: introduce uniqueness validation for remote role name

This commit is contained in:
kasia.oczkowska
2024-10-25 15:35:35 +01:00
parent 47510e24d5
commit 79050af391
5 changed files with 81 additions and 13 deletions

View File

@@ -31,6 +31,7 @@ function TextField(props) {
onBlur,
onChange,
'data-test': dataTest,
showError = false,
...textFieldProps
} = props;
return (
@@ -47,6 +48,7 @@ function TextField(props) {
onBlur: controllerOnBlur,
...field
},
fieldState: { error },
}) => (
<MuiTextField
{...textFieldProps}
@@ -72,6 +74,7 @@ function TextField(props) {
inputProps={{
'data-test': dataTest,
}}
{...(showError && { helperText: error?.message, error: !!error })}
/>
)}
/>
@@ -89,6 +92,7 @@ TextField.propTypes = {
disabled: PropTypes.bool,
onBlur: PropTypes.func,
onChange: PropTypes.func,
showError: PropTypes.bool,
};
export default TextField;