Skip to content

Commit

Permalink
[fixed] regression with disabled lsit items
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jul 22, 2016
1 parent 17aeefe commit 90c304f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default React.createClass({
let id = instanceId(this)
, items;

let props = _.omitOwnProps(this);
let elementProps = _.omitOwnProps(this);

items = !data.length
? (
Expand All @@ -86,8 +86,8 @@ export default React.createClass({
</li>
) : data.map((item, idx) => {
var currentId = optionId(id, idx)
, isDisabled = isDisabledItem(item, props)
, isReadOnly = isReadOnlyItem(item, props);
, isDisabled = isDisabledItem(item, this.props)
, isReadOnly = isReadOnlyItem(item, this.props);

return (
<Option
Expand Down Expand Up @@ -120,7 +120,7 @@ export default React.createClass({
tabIndex='-1'
className={cn(className, 'rw-list')}
role={role === undefined ? 'listbox' : role}
{...props}
{...elementProps}
>
{ items }
</ul>
Expand Down
6 changes: 3 additions & 3 deletions src/ListGroupable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ export default React.createClass({
let { className, role, data, messages } = this.props
let { sortedKeys, groups } = this.state;

let props = _.omitOwnProps(this);
let elementProps = _.omitOwnProps(this);

let items = []
, idx = -1
, group;

let id = instanceId(this);

this._currentActiveID = null;

if (data.length) {
Expand All @@ -124,7 +124,7 @@ export default React.createClass({
tabIndex='-1'
className={cn(className, 'rw-list', 'rw-list-grouped')}
role={role === undefined ? 'listbox' : role }
{ ...props }
{...elementProps}
>
{ items }
</ul>
Expand Down

0 comments on commit 90c304f

Please sign in to comment.