add ids to CodeMirror FormGroup containers

This commit is contained in:
Keith Grant
2020-09-08 10:17:18 -07:00
parent 40d3e4ee8b
commit 13e6757666
2 changed files with 4 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ function CodeMirrorField({
return ( return (
<FormGroup <FormGroup
id={`${id}-field`}
fieldId={id} fieldId={id}
helperText={helperText} helperText={helperText}
helperTextInvalid={meta.error} helperTextInvalid={meta.error}
@@ -39,7 +40,7 @@ function CodeMirrorField({
labelIcon={<FieldTooltip content={tooltip} />} labelIcon={<FieldTooltip content={tooltip} />}
> >
<CodeMirrorInput <CodeMirrorInput
id="webhook-headers" id={id}
{...rest} {...rest}
{...field} {...field}
onChange={value => { onChange={value => {

View File

@@ -107,6 +107,7 @@ CodeMirrorInput.propTypes = {
hasErrors: bool, hasErrors: bool,
fullHeight: bool, fullHeight: bool,
rows: number, rows: number,
className: string,
}; };
CodeMirrorInput.defaultProps = { CodeMirrorInput.defaultProps = {
readOnly: false, readOnly: false,
@@ -114,6 +115,7 @@ CodeMirrorInput.defaultProps = {
rows: 6, rows: 6,
fullHeight: false, fullHeight: false,
hasErrors: false, hasErrors: false,
className: '',
}; };
export default CodeMirrorInput; export default CodeMirrorInput;