Skip to content

Commit 2379e8d

Browse files
committed
2 parents d4559f4 + bc5c948 commit 2379e8d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A RecyclerView implementation for ReactNative, that overcomes some limitations o
88
|-----------------------|---------------|
99
| **0.1.x** | **0.45, 0.46** |
1010
| **0.2.0 - 0.2.2** | **0.47, 0.48** |
11-
| **0.2.3** | **>= 0.49** |
11+
| **0.2.3 - latest** | **>= 0.49** |
1212

1313
## Features
1414

@@ -124,7 +124,9 @@ Method name | Params | Description
124124
`set` | index, item | Set the item at the specified index
125125
`get` | index | Returns the item at the specified index
126126
`size` | | Returns the length of the array
127-
`setDirty` | | Forces the RecyclerViewList to render again the visible items
127+
`setDirty` | | Forces the RecyclerViewList to render again the visible items
128+
`moveUp` | index | Move the item up of 1 position
129+
`moveDown` | index | Move the item down of 1 position
128130

129131
# How to contribute to this library
130132

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-recyclerview-list",
3-
"version": "0.3.0",
3+
"version": "0.3.2",
44
"description": "A RecyclerView implementation for React Native",
55
"main": "index.js",
66
"repository": {

src/RecyclerViewList.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { Component } from 'react';
2-
import ReactNative, { View, requireNativeComponent, DeviceEventEmitter, StyleSheet, UIManager } from 'react-native';
2+
import ReactNative, { View, requireNativeComponent, DeviceEventEmitter, StyleSheet, UIManager, ViewPropTypes } from 'react-native';
33
import PropTypes from 'prop-types';
44
import DataSource from './DataSource';
55

66
class RecyclerViewItem extends Component {
77
static propTypes = {
8-
style: View.propTypes.style,
8+
style: ViewPropTypes.style,
99
itemIndex: PropTypes.number,
1010
shouldUpdate: PropTypes.bool,
1111
dataSource: PropTypes.object,
@@ -65,7 +65,7 @@ class RecyclerView extends React.PureComponent {
6565
}
6666

6767
static defaultProps = {
68-
dataSource: new DataSource(),
68+
dataSource: new DataSource([], (item, i) => i),
6969
initialListSize: 10,
7070
windowSize: 30,
7171
itemAnimatorEnabled: true,

0 commit comments

Comments
 (0)