Skip to content

Commit

Permalink
release v2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Apr 20, 2015
1 parent 9fa804c commit b2a4974
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-widgets",
"version": "2.5.0",
"version": "2.5.1",
"main": "dist/react-widgets.js",
"description": "A set of input widgets for React",
"homepage": "http://jquense.github.io/react-widgets/docs",
Expand Down
11 changes: 6 additions & 5 deletions dist/react-widgets.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/DropdownList.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ var DropdownList = React.createClass({
React.createElement(
Popup,
babelHelpers._extends({}, _.pick(this.props, Object.keys(compat.type(Popup).propTypes)), {
onOpen: this.focus,
onOpening: function () {
return (_this.refs.list.forceUpdate(), _this.focus());
return _this.refs.list.forceUpdate();
},
onRequestClose: this.close }),
React.createElement(
Expand Down
39 changes: 21 additions & 18 deletions lib/mixins/PopupScrollToMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@ var scrollTo = require("../util/dom/scroll");

module.exports = {

_scrollTo: function (selected, list, focused) {
var state = this._scrollState || (this._scrollState = {}),
handler = this.props.onMove,
lastVisible = state.visible,
lastItem = state.focused,
shown,
changed;
_scrollTo: function (selected, list, focused) {
var state = this._scrollState || (this._scrollState = {}),
handler = this.props.onMove,
lastVisible = state.visible,
lastItem = state.focused,
shown,
changed;

state.visible = !(!list.offsetWidth || !list.offsetHeight);
state.focused = focused;
state.visible = !(!list.offsetWidth || !list.offsetHeight);
state.focused = focused;

changed = lastItem !== focused;
shown = state.visible && !lastVisible;
changed = lastItem !== focused;
shown = state.visible && !lastVisible

if (shown || state.visible && changed) {
if (handler) handler(selected, list, focused);else {
state.scrollCancel && state.scrollCancel();
state.scrollCancel = scrollTo(selected, list);
}
}
} };
// if ( shown || (state.visible && changed) ){
// if ( handler )
// handler(selected, list, focused)
// else {
// state.scrollCancel && state.scrollCancel()
// state.scrollCancel = scrollTo(selected, list)
// }
// }
;
} };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-widgets",
"version": "2.5.0",
"version": "2.5.1",
"description": "A set of input widgets for React",
"main": "lib/index.js",
"author": {
Expand Down

0 comments on commit b2a4974

Please sign in to comment.