Skip to content

Commit

Permalink
added id to FormCheckBox (#5793)
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentFlameCR authored May 2, 2024
1 parent 959ef57 commit 3997264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@ import { Form as BootstrapForm } from 'react-bootstrap';
import FormControlGeneric from '../FormControlGeneric';

export default function FormCheckBox({
field,
id, field,
}) {
return (
<FormControlGeneric
control={BootstrapForm.Check}
field={field}
label={field.label}
id={id}
type="checkbox"
/>
);
}

FormCheckBox.propTypes = {
// TODO: Amir - refactor propTypes to reduce duplication.
id: PropTypes.string.isRequired,
field: PropTypes.shape(
{
label: PropTypes.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function SigninForm() {
<FormControl field={fields.password} type="password" />
<Row>
<Col>
<FormCheckBox field={fields.extend_session} />
<FormCheckBox id={fields.extend_session.hookForm.id} field={fields.extend_session} />
</Col>
<Col>
{
Expand Down

0 comments on commit 3997264

Please sign in to comment.