Skip to content

Commit

Permalink
fix(Input): allow id or htmlId prop to set id
Browse files Browse the repository at this point in the history
  • Loading branch information
bfbiggs authored and pauljeter committed Sep 30, 2019
1 parent c1bfb67 commit 87c1f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react/src/lib/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Input extends React.Component {
{...ariaDescribedBy && { 'aria-describedby': ariaDescribedBy }}
{...ariaLabel && { 'aria-label': ariaLabel }}
{...disabled && { disabled }}
{...htmlId && { id: htmlId }}
{...(htmlId || id) && { id: htmlId || id }}
{...otherProps}
{...placeholder && { placeholder }}
{...readOnly && { readOnly }}
Expand Down Expand Up @@ -258,7 +258,7 @@ class Input extends React.Component {
secondaryLabel &&
<Label
className='md-input__secondary-label'
htmlFor={htmlId}
htmlFor={htmlId || id}
label={secondaryLabel}
/>
}
Expand Down

0 comments on commit 87c1f27

Please sign in to comment.