From 08ed387399256cee8b5c74b8357b2ad007e5bd27 Mon Sep 17 00:00:00 2001 From: blacktemplar Date: Tue, 4 Apr 2017 19:43:37 +0200 Subject: [PATCH] gives possibility to use ref property for Creatable --- src/Creatable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Creatable.js b/src/Creatable.js index f1f3fe33e5..1916da045c 100644 --- a/src/Creatable.js +++ b/src/Creatable.js @@ -211,6 +211,7 @@ const Creatable = React.createClass({ const { newOptionCreator, shouldKeyDownEventCreateNewOption, + ref: refProp, ...restProps } = this.props; @@ -238,6 +239,9 @@ const Creatable = React.createClass({ this.labelKey = ref.props.labelKey; this.valueKey = ref.props.valueKey; } + if (refProp) { + refProp(ref); + } } };