Skip to content

Commit

Permalink
Updating build
Browse files Browse the repository at this point in the history
  • Loading branch information
JedWatson committed May 24, 2017
1 parent 7013005 commit e06ea57
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 405 deletions.
10 changes: 7 additions & 3 deletions dist/react-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1765,10 +1765,12 @@ var Select = (0, _createReactClass2['default'])({

var divProps = _objectWithoutProperties(_props$inputProps, ['inputClassName']);

var _ariaOwns = (0, _classnames2['default'])(_defineProperty({}, this._instancePrefix + '-list', isOpen));

return _react2['default'].createElement('div', _extends({}, divProps, {
role: 'combobox',
'aria-expanded': isOpen,
'aria-owns': isOpen ? this._instancePrefix + '-list' : this._instancePrefix + '-value',
'aria-owns': _ariaOwns,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
className: className,
tabIndex: this.props.tabIndex || 0,
Expand All @@ -1792,7 +1794,8 @@ var Select = (0, _createReactClass2['default'])({
},

renderClear: function renderClear() {
if (!this.props.clearable || !this.props.value || this.props.value === 0 || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;

if (!this.props.clearable || this.props.value === undefined || this.props.value === null || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;
var clear = this.props.clearRenderer();

return _react2['default'].createElement(
Expand Down Expand Up @@ -1910,11 +1913,12 @@ var Select = (0, _createReactClass2['default'])({
var options = this._visibleOptions;
if (!options.length) return null;

var valueKey = this.props.valueKey;
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
var focusedOptionIndex = -1;
options.some(function (option, index) {
var isOptionEqual = option.value === focusedOption.value;
var isOptionEqual = option[valueKey] === focusedOption[valueKey];
if (isOptionEqual) {
focusedOptionIndex = index;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/react-select.min.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions examples/dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2041,10 +2041,12 @@ var Select = (0, _createReactClass2['default'])({

var divProps = _objectWithoutProperties(_props$inputProps, ['inputClassName']);

var _ariaOwns = (0, _classnames2['default'])(_defineProperty({}, this._instancePrefix + '-list', isOpen));

return _react2['default'].createElement('div', _extends({}, divProps, {
role: 'combobox',
'aria-expanded': isOpen,
'aria-owns': isOpen ? this._instancePrefix + '-list' : this._instancePrefix + '-value',
'aria-owns': _ariaOwns,
'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
className: className,
tabIndex: this.props.tabIndex || 0,
Expand All @@ -2068,7 +2070,8 @@ var Select = (0, _createReactClass2['default'])({
},

renderClear: function renderClear() {
if (!this.props.clearable || !this.props.value || this.props.value === 0 || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;

if (!this.props.clearable || this.props.value === undefined || this.props.value === null || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;
var clear = this.props.clearRenderer();

return _react2['default'].createElement(
Expand Down Expand Up @@ -2186,11 +2189,12 @@ var Select = (0, _createReactClass2['default'])({
var options = this._visibleOptions;
if (!options.length) return null;

var valueKey = this.props.valueKey;
var focusedOption = this.state.focusedOption || selectedOption;
if (focusedOption && !focusedOption.disabled) {
var focusedOptionIndex = -1;
options.some(function (option, index) {
var isOptionEqual = option.value === focusedOption.value;
var isOptionEqual = option[valueKey] === focusedOption[valueKey];
if (isOptionEqual) {
focusedOptionIndex = index;
}
Expand Down
Loading

0 comments on commit e06ea57

Please sign in to comment.