Skip to content

Commit

Permalink
hide option id, fix illegal default id value (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmoffet authored Jun 6, 2024
1 parent a8ff905 commit d53784d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const EditComponent = ({ pattern }: { pattern: RadioGroupPattern }) => {
) : null}
<div className="display-flex">
<input
className={classnames('usa-input', {
className={classnames('hide', 'usa-input', {
'usa-label--error': label.error,
})}
id={fieldId(`options.${index}.id`)}
Expand All @@ -101,7 +101,7 @@ const EditComponent = ({ pattern }: { pattern: RadioGroupPattern }) => {
type="button"
onClick={event => {
event.preventDefault();
const optionId = `${options.length + 1}`;
const optionId = `option-${options.length + 1}`;
setOptions(options.concat({ id: optionId, label: optionId }));
}}
>
Expand Down

0 comments on commit d53784d

Please sign in to comment.