Skip to content

Commit

Permalink
Fixed bug with master details component
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbull committed Oct 18, 2017
1 parent 87a3d41 commit 71e743b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![npm version](https://img.shields.io/npm/v/react-desktop.svg)](https://www.npmjs.org/package/react-desktop)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gabrielbull/react-desktop?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

React UI Components for macOS Sierra and Windows 10.
React UI Components for macOS High Sierra and Windows 10.

> npm install react-desktop --save
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Documentation

**react-desktop** is a JavaScript library built on top of [Facebook's React](https://facebook.github.io/react/) library,
which aims to bring a native desktop experience to the web, featuring many macOS Sierra and Windows 10 components.
which aims to bring a native desktop experience to the web, featuring many macOS High Sierra and Windows 10 components.
**react-desktop** works perfectly with [NW.js](http://nwjs.io) and [Electron.js](http://electron.atom.io), but
can be used in any JavaScript powered project!

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "react-desktop",
"author": "Gabriel Bull",
"version": "0.3.1",
"description": "React UI Components for macOS Sierra and Windows 10",
"version": "0.3.2",
"description": "React UI Components for macOS High Sierra and Windows 10",
"main": "./index.js",
"keywords": [
"react",
Expand Down
9 changes: 2 additions & 7 deletions src/masterDetailsView/windows/masterDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ class MasterDetailsView extends Component {

select(index) {
this.setState({ selected: index });
for (var prop in this.refs) {
if (this.refs.hasOwnProperty(prop) && prop.indexOf('master') === 0) {
this.refs[prop].setState({ selected: prop === 'master' + index });
}
}
}

filterChildren(children) {
Expand All @@ -98,12 +93,12 @@ class MasterDetailsView extends Component {
}
this.masters = [
...this.masters,
cloneElement(child, { key: key, ref: 'master' + key, index: key })
cloneElement(child, { key: key, index: key })
];
} else if (child.type === Details) {
this.details = [
...this.details,
cloneElement(child, { key: key, ref: 'details' + key, index: key })
cloneElement(child, { key: key, index: key })
];
}
});
Expand Down

0 comments on commit 71e743b

Please sign in to comment.