Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
use span instead of div for wrapper-element
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Reuter committed Feb 8, 2018
1 parent 9b4b196 commit 3d82b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
We try to follow [http://keepachangelog.com/](http://keepachangelog.com/) recommendations for easier to update & more readable change logs.

## [Unreleased]
_(add items here for easier creation of next log entry)_
### Fixed
- Wrap component in a `span` element instead of a `div` to produce valid HTML if this component is used inside an element which only allows inline elements (like `p``).

## [1.8.0] - 2018-02-04
### Added
Expand Down
4 changes: 2 additions & 2 deletions lib/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ class Autocomplete extends React.Component {
const { inputProps } = this.props
const open = this.isOpen()
return (
<div style={{ ...this.props.wrapperStyle }} {...this.props.wrapperProps}>
<span style={{ ...this.props.wrapperStyle }} {...this.props.wrapperProps}>
{this.props.renderInput({
...inputProps,
role: 'combobox',
Expand All @@ -591,7 +591,7 @@ class Autocomplete extends React.Component {
{JSON.stringify(this._debugStates.slice(Math.max(0, this._debugStates.length - 5), this._debugStates.length), null, 2)}
</pre>
)}
</div>
</span>
)
}
}
Expand Down

0 comments on commit 3d82b8c

Please sign in to comment.