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

Commit 1f960f1

Browse files
author
Nicholas Kinsey
committed
Adding WrapperProps and WrapperStyle attributes
Rebase of 6f0b53d by @zoeabryant
1 parent a7b44d1 commit 1f960f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/Autocomplete.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ let Autocomplete = React.createClass({
1212
shouldItemRender: React.PropTypes.func,
1313
renderItem: React.PropTypes.func.isRequired,
1414
menuStyle: React.PropTypes.object,
15+
wrapperProps: React.PropTypes.object,
16+
wrapperStyle: React.PropTypes.object,
1517
inputProps: React.PropTypes.object
1618
},
1719

1820
getDefaultProps () {
1921
return {
22+
wrapperProps: {},
23+
wrapperStyle: {
24+
display: 'inline-block'
25+
},
2026
inputProps: {},
2127
onChange () {},
2228
onSelect (value, item) {},
@@ -298,7 +304,7 @@ let Autocomplete = React.createClass({
298304
})
299305
}
300306
return (
301-
<div style={{display: 'inline-block'}}>
307+
<div {...this.props.wrapperProps} style={{...this.props.wrapperStyle}}>
302308
<input
303309
{...this.props.inputProps}
304310
role="combobox"

0 commit comments

Comments
 (0)