diff --git a/.npmignore b/.npmignore index d52fd20..dde5e09 100644 --- a/.npmignore +++ b/.npmignore @@ -5,3 +5,4 @@ demo .watchmanconfig example.gif yarn-error.log +example2.gif diff --git a/README.md b/README.md index 4ad783e..be8a55c 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,20 @@ const styles = StyleSheet.create({ | onDragRelease | (data) => void | no | Function will execute when item release, and will return the new ordered data | | onResetSort | (data) => void | no | Function will execute when dragged item change sort | +## Item Props + +| parameter | type | required | description | +| :-------- | :---- | :------- | :---------- | +| disabledDrag | boolean | no | It will disable drag for the item | +| disabledResorted | boolean | no | It will disable resort the item | + +if you set disabledResorted be true, it will look like that + +

+ Issue Stats +

+ + ## Custom Drag Start Animation If you want to use your custom animation, you can do like this diff --git a/README_CN.md b/README_CN.md index 108fc57..3f4d587 100644 --- a/README_CN.md +++ b/README_CN.md @@ -130,6 +130,20 @@ const styles = StyleSheet.create({ | onDragRelease | (data) => void | no | 拖动释放时的回调,会返回排序之后的数据 | | onResetSort | (data) => void | no | 拖动时重新排序的回调,会返回排序后的数据 | +## Item Props + +| parameter | type | required | description | +| :-------- | :---- | :------- | :---------- | +| disabledDrag | boolean | no | 禁止选项拖动 | +| disabledResorted | boolean | no | 禁止选项被重新排序 | + +设置 `disabledResorted` 为 `true`, 那么那个选项拖动时排序的时候就会被忽略 + +

+ Issue Stats +

+ + ## 自定义拖动开始时的动画 如果你想自定义拖动开始时的动画,你可以这样使用 diff --git a/example2.gif b/example2.gif new file mode 100644 index 0000000..1ff8d93 Binary files /dev/null and b/example2.gif differ diff --git a/package.json b/package.json index 07036e8..1192c34 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "sortable", "grid" ], - "version": "1.1.1", + "version": "1.2.0", "description": "A draggable grid for react native", "main": "built/index.js", "types": "src/index.ts",