react-selectize
Advanced tools
Comparing version 0.3.9 to 0.3.10
@@ -88,1 +88,4 @@ # React Selectize | ||
* added `on-enter :: Item -> Void` prop, fired (with the `highlighted-option`) when the user hits the enter key (#19) | ||
## v0.3.10 / 19th January 2016 | ||
* fixed a bug where elements behind the dropdown were not clickable even though the dropdown was closed. (#18) |
{ | ||
"name": "react-selectize", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"description": "A Stateless & Flexible Select component for React inspired by Selectize", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
(function(){ | ||
var ref$, each, filter, find, findIndex, id, initial, last, map, objToPairs, partition, reject, reverse, Str, sortBy, sum, values, clamp, isEqualToObject, React, div, input, span, createClass, createFactory, findDOMNode, ReactCSSTransitionGroup, cancelEvent, classNameFromObject, OptionWrapper, ValueWrapper; | ||
var ref$, each, filter, find, findIndex, id, initial, last, map, objToPairs, partition, reject, reverse, Str, sortBy, sum, values, clamp, isEqualToObject, React, div, input, span, createClass, createFactory, findDOMNode, ReactCSSTransitionGroup, cancelEvent, classNameFromObject, OptionWrapper, ValueWrapper, DropdownWrapper; | ||
ref$ = require('prelude-ls'), each = ref$.each, filter = ref$.filter, find = ref$.find, findIndex = ref$.findIndex, id = ref$.id, initial = ref$.initial, last = ref$.last, map = ref$.map, objToPairs = ref$.objToPairs, partition = ref$.partition, reject = ref$.reject, reverse = ref$.reverse, Str = ref$.Str, sortBy = ref$.sortBy, sum = ref$.sum, values = ref$.values; | ||
@@ -55,2 +55,25 @@ ref$ = require('prelude-extension'), clamp = ref$.clamp, isEqualToObject = ref$.isEqualToObject; | ||
})); | ||
DropdownWrapper = createFactory(createClass({ | ||
getDefaultProps: function(){ | ||
return { | ||
className: "", | ||
onHeightChange: function(){} | ||
}; | ||
}, | ||
render: function(){ | ||
return div({ | ||
className: this.props.className, | ||
ref: 'dropdown' | ||
}, this.props.children); | ||
}, | ||
componentDidMount: function(){ | ||
this.props.onHeightChange(this.refs.dropdown.offsetHeight); | ||
}, | ||
componentDidUpdate: function(){ | ||
this.props.onHeightChange(this.refs.dropdown.offsetHeight); | ||
}, | ||
componentWillUnmount: function(){ | ||
this.props.onHeightChange(0); | ||
} | ||
})); | ||
module.exports = createClass({ | ||
@@ -448,6 +471,9 @@ displayName: 'ReactSelectize', | ||
}())); | ||
}, div({ | ||
}, DropdownWrapper({ | ||
className: 'dropdown', | ||
key: 'dropdown', | ||
ref: 'dropdown' | ||
ref: 'dropdown', | ||
onHeightChange: function(height){ | ||
return findDOMNode(this$.refs['dropdown-transition']).style.height = height + "px"; | ||
} | ||
}, this.props.options.length === 0 | ||
@@ -516,4 +542,4 @@ ? this.props.renderNoResultsFound() | ||
}, | ||
componentDidUpdate: function(prevProps, prevState){ | ||
var x$, $search, $dropdownTransition, ref$; | ||
componentDidUpdate: function(prevProps){ | ||
var x$, $search, $dropdownTransition; | ||
if (this.props.open && !prevProps.open && this.props.highlightedUid === undefined) { | ||
@@ -531,7 +557,3 @@ this.highlightAndScrollToSelectableOption(this.props.firstOptionIndexToHighlight(this.props.options), 1); | ||
if (!!this.refs.dropdown) { | ||
ref$ = $dropdownTransition.style; | ||
ref$.bottom = this.props.dropdownDirection === -1 ? findDOMNode(this.refs.control).offsetHeight : ""; | ||
ref$.height = this.refs.dropdown.offsetHeight + "px"; | ||
} else { | ||
$dropdownTransition.style.height = '0px'; | ||
$dropdownTransition.style.bottom = this.props.dropdownDirection === -1 ? findDOMNode(this.refs.control).offsetHeight : ""; | ||
} | ||
@@ -538,0 +560,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2000436
50679