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

Commit 3d82b8c

Browse files
author
Johannes Reuter
committed
use span instead of div for wrapper-element
1 parent 9b4b196 commit 3d82b8c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
We try to follow [http://keepachangelog.com/](http://keepachangelog.com/) recommendations for easier to update & more readable change logs.
33

44
## [Unreleased]
5-
_(add items here for easier creation of next log entry)_
5+
### Fixed
6+
- 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``).
67

78
## [1.8.0] - 2018-02-04
89
### Added

lib/Autocomplete.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ class Autocomplete extends React.Component {
570570
const { inputProps } = this.props
571571
const open = this.isOpen()
572572
return (
573-
<div style={{ ...this.props.wrapperStyle }} {...this.props.wrapperProps}>
573+
<span style={{ ...this.props.wrapperStyle }} {...this.props.wrapperProps}>
574574
{this.props.renderInput({
575575
...inputProps,
576576
role: 'combobox',
@@ -591,7 +591,7 @@ class Autocomplete extends React.Component {
591591
{JSON.stringify(this._debugStates.slice(Math.max(0, this._debugStates.length - 5), this._debugStates.length), null, 2)}
592592
</pre>
593593
)}
594-
</div>
594+
</span>
595595
)
596596
}
597597
}

0 commit comments

Comments
 (0)