Skip to content

Commit c197218

Browse files
committed
Merge pull request #32 from Vermonster/master
Add support dropdownParent option as a string
2 parents 4916166 + de45a68 commit c197218

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/Select2.js

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export default class Select2 extends Component {
8686
if (this.el) { return; }
8787
const { defaultValue, value, options } = this.props;
8888

89+
if (typeof options.dropdownParent === 'string') {
90+
options.dropdownParent = $(options.dropdownParent);
91+
}
92+
8993
this.el = $(ReactDOM.findDOMNode(this));
9094
this.el.select2(options);
9195

0 commit comments

Comments
 (0)