Skip to content

Commit

Permalink
Removed rubber band effect from list view
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbull committed Mar 14, 2017
1 parent 1480783 commit 7b0adb4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.2.19 (March 14th, 2017)

- Removed rubber band effect from list view

## 0.2.18 (March 14th, 2017)

- Fixed an issue with OS detection
Expand Down
1 change: 0 additions & 1 deletion docs/mac-os/list-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Property | Type | Description
:------------------ | :-------------:| :----------
background | string | Sets the background color of a component.
disableRubberBand | bool | Disables the rubber band effect on the list view.
height | number | Sets the height of a component.
hidden | bool | Sets the visibility of a component.
margin | string, number | Sets the outer margin of a component.<br/>__E.G.__ _"30px 20px"_
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-desktop",
"author": "Gabriel Bull",
"version": "0.2.18",
"version": "0.2.19",
"description": "React UI Components for macOS Sierra and Windows 10",
"main": "./index.js",
"keywords": [
Expand Down Expand Up @@ -34,8 +34,7 @@
"build-publish": "npm run build && npm publish ./build"
},
"dependencies": {
"radium": "^0.18.1",
"rubber-band-effect": "^0.1.1"
"radium": "^0.18.1"
},
"peerDependencies": {
"react": "^15.0.0",
Expand Down
15 changes: 1 addition & 14 deletions src/listView/macOs/listView.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Padding, { paddingPropTypes } from '../../style/padding';
import Header from './header/header';
import Footer from './footer/footer';
import Row from './row/row';
import rubberBandEffect from 'rubber-band-effect';

@Background()
@Dimension()
Expand All @@ -22,20 +21,9 @@ class ListView extends Component {
...dimensionPropTypes,
...hiddenPropTypes,
...marginPropTypes,
...paddingPropTypes,
disableRubberBand: PropTypes.bool
...paddingPropTypes
};

static defaultProps = {
disableRubberBand: false
};

componentDidMount() {
if (!this.props.disableRubberBand) {
rubberBandEffect(ReactDOM.findDOMNode(this.refs.scrollable));
}
}

mapChildren(children) {
let hasDirectRows = false;
let header = null, items = null, footer = null;
Expand All @@ -57,7 +45,6 @@ class ListView extends Component {

render() {
const { children, style, ...props } = this.props;
delete props.disableRubberBand;

const { header, items, footer } = this.mapChildren(children);

Expand Down

0 comments on commit 7b0adb4

Please sign in to comment.