Skip to content

Commit

Permalink
Moved input so that value element can be scrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
f0urfingeredfish committed Jan 12, 2017
1 parent 1fa4635 commit 3a46fba
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 19 deletions.
1 change: 0 additions & 1 deletion dist/react-select.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
padding-right: 10px;
position: absolute;
right: 0;
top: 0;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
6 changes: 3 additions & 3 deletions dist/react-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ var Select = _react2['default'].createClass({
if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {
removeMessage = _react2['default'].createElement(
'span',
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only Select-remove-message', 'aria-live': 'assertive' },
this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])
);
}
Expand Down Expand Up @@ -1878,9 +1878,9 @@ var Select = _react2['default'].createClass({
_react2['default'].createElement(
'span',
{ className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },
this.renderValue(valueArray, isOpen),
this.renderInput(valueArray, focusedOptionIndex)
this.renderValue(valueArray, isOpen)
),
this.renderInput(valueArray, focusedOptionIndex),
removeMessage,
this.renderLoading(),
this.renderClear(),
Expand Down
2 changes: 1 addition & 1 deletion dist/react-select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react-select.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ var Select = _react2['default'].createClass({
if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {
removeMessage = _react2['default'].createElement(
'span',
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only Select-remove-message', 'aria-live': 'assertive' },
this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])
);
}
Expand Down Expand Up @@ -2122,9 +2122,9 @@ var Select = _react2['default'].createClass({
_react2['default'].createElement(
'span',
{ className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },
this.renderValue(valueArray, isOpen),
this.renderInput(valueArray, focusedOptionIndex)
this.renderValue(valueArray, isOpen)
),
this.renderInput(valueArray, focusedOptionIndex),
removeMessage,
this.renderLoading(),
this.renderClear(),
Expand Down
1 change: 0 additions & 1 deletion examples/dist/example.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
padding-right: 10px;
position: absolute;
right: 0;
top: 0;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
6 changes: 3 additions & 3 deletions examples/dist/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ var Select = _react2['default'].createClass({
if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {
removeMessage = _react2['default'].createElement(
'span',
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only Select-remove-message', 'aria-live': 'assertive' },
this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])
);
}
Expand Down Expand Up @@ -1878,9 +1878,9 @@ var Select = _react2['default'].createClass({
_react2['default'].createElement(
'span',
{ className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },
this.renderValue(valueArray, isOpen),
this.renderInput(valueArray, focusedOptionIndex)
this.renderValue(valueArray, isOpen)
),
this.renderInput(valueArray, focusedOptionIndex),
removeMessage,
this.renderLoading(),
this.renderClear(),
Expand Down
1 change: 0 additions & 1 deletion less/control.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
padding-right: @select-padding-horizontal;
position: absolute;
right: 0;
top: 0;

// crop text
max-width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions lib/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ var Select = _react2['default'].createClass({
if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {
removeMessage = _react2['default'].createElement(
'span',
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },
{ id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only Select-remove-message', 'aria-live': 'assertive' },
this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])
);
}
Expand Down Expand Up @@ -1186,8 +1186,8 @@ var Select = _react2['default'].createClass({
{ className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },
this.renderValue(valueArray, isOpen)
),
removeMessage,
this.renderInput(valueArray, focusedOptionIndex),
removeMessage,
this.renderLoading(),
this.renderClear(),
this.renderArrow()
Expand Down
1 change: 0 additions & 1 deletion scss/control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
padding-right: $select-padding-horizontal;
position: absolute;
right: 0;
top: 0;

// crop text
max-width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ const Select = React.createClass({
this.state.isFocused &&
this.props.backspaceRemoves) {
removeMessage = (
<span id={this._instancePrefix + '-backspace-remove-message'} className="Select-aria-only" aria-live="assertive">
<span id={this._instancePrefix + '-backspace-remove-message'} className="Select-aria-only Select-remove-message" aria-live="assertive">
{this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])}
</span>
);
Expand All @@ -1089,8 +1089,8 @@ const Select = React.createClass({
>
<span className="Select-multi-value-wrapper" id={this._instancePrefix + '-value'}>
{this.renderValue(valueArray, isOpen)}
{this.renderInput(valueArray, focusedOptionIndex)}
</span>
{this.renderInput(valueArray, focusedOptionIndex)}
{removeMessage}
{this.renderLoading()}
{this.renderClear()}
Expand Down

0 comments on commit 3a46fba

Please sign in to comment.