From b852217160c6e09cfc0d77a4617e576fffa867c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=A0=B4=E5=A4=A9?= Date: Wed, 10 Jan 2018 18:22:01 +0800 Subject: [PATCH 1/5] Update readme for 1.2.2 --- README-cn.md | 23 ++++++++++++++++++++++- README.md | 15 ++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/README-cn.md b/README-cn.md index 37831166..bbdc4b27 100644 --- a/README-cn.md +++ b/README-cn.md @@ -7,7 +7,7 @@ For English docs [click here](./README.md) ## 特点 * react-native-largelist 比官网的SectionList CPU和内存占用更少,性能表现更好,在最坏的情况下(比如从第一行直接用代码滑动到第1000行),即使出现白板,也是瞬间消失。 * 支持超大数据源,支持无限列表,支持超快速度滑动。 -* 跨平台,兼容iOS和Android。 +* 跨平台,兼容iOS和Android。优化自ScrollView,对RN版本兼容性好。 * 支持分组,支持每组头视图自动吸顶,新的Section挂在列表顶部时,支持回调。 * 行组件进入或离开安全区域时可配置回调事件。 * 支持单独的头部、尾部和空视图。 @@ -110,6 +110,18 @@ refreshing | boolean | undefined | 是否正在刷新 onRefresh | () => any | undefined | 下拉刷新的回调,如果用户设置了此属性,则添加一个刷新控件 onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动的回调,同官方ScrollView +注意: + +* 不同于FlatList,LargeList是惰性的,不会立即重新计算布局,当您的数据源改变的时候,影响到以下因素时,必须调用[reloadData](#reloadData)重新布局 + +1. 头部和尾部高度变化 + +2. 任何一行Cell或Section高度变化 + +3. 任何一组Section下的Cell数量变化 + +4. Section数量变化 + ## 原理 在了解高级用法之前,我们先要了解下基本原理: @@ -296,6 +308,8 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动 1. reloadIndexPath, reloadIndexPaths, reloadAll 都是局部重新加载,因此影响列表的全局属性,比如numberOfSections ,numberOfRowsInSection,heightForSection,heightForCell属性改变,则会导致错乱,请使用reloadData。 + + ### reloadData() 全局重新加载所有数据 @@ -332,6 +346,13 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动 ## 更新日志 +### 版本 1.2.2 +* 修复onLargeListDidUpdate的回调时机问题 +* 支持TypeScript + +### 版本 1.2.1 +* 修复左右滑动编辑过程中,上下滑动的问题 + ### 版本 1.2.0 * 添加左右滑动编辑功能 * 添加空视图 diff --git a/README.md b/README.md index 3a431dbe..90c6f228 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ * The performance of react-native-largelist is much better than FlatList and SectionList.And lower CPU/Memory usage. * Large data source supported, infinite data supported, super fast sliding support. -* Full cross-platform. +* Full cross-platform,Optimize from ScrollView, better version compatibility. * Sticky Section support. * Callback when Cell/Item enter/leave the safeArea support. * List header/footer/empty support. @@ -111,6 +111,10 @@ refreshing | boolean | undefined | refreshing onRefresh | () => any | undefined | callback of pulling to refresh,if not undefined ,a default RefreshControl is add to LargeList onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | Callback when scrolling. +Notice: + +* If your data source change and it affects the number of sections or the number of cells in section, or the height of any sections or cells, you must call [reloadData](#reloadData) + ## Principle Before we learn advanced usage, we must first understand the basic principles: @@ -298,6 +302,8 @@ Notice: 1. reloadIndexPath, reloadIndexPaths, reloadAll work partially. They do not work well when the numberOfSections ,numberOfRowsInSection,heightForSection,heightForCell change.Use reloadData instead. + + ### reloadData() Reload all datasource globally. @@ -332,6 +338,13 @@ Get LargeList's footer height ## Update Log +### Version 1.2.2 +* Fix bug on onLargeListDidUpdate +* Support TypeScript + +### Version 1.2.1 +* Fix bug when swipe out. + ### Version 1.2.0 * Add swiping left and right to edit cell * Add empty view From 6431e46f077bc86831d9b2585c8fec111fb1480b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=A0=B4=E5=A4=A9=E6=83=8A?= Date: Wed, 10 Jan 2018 18:36:30 +0800 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90c6f228..0f1c8189 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | Callba Notice: -* If your data source change and it affects the number of sections or the number of cells in section, or the height of any sections or cells, you must call [reloadData](#reloadData) +* If your data source change and it affects the number of sections or the number of cells in section, or the height of any sections or cells, you must call [reloadData](#Features) ## Principle Before we learn advanced usage, we must first understand the basic principles: From 0dc8a5d13b9dcd54066025c82a2aa75b6e978016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=A0=B4=E5=A4=A9=E6=83=8A?= Date: Wed, 10 Jan 2018 18:41:13 +0800 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f1c8189..950db9f0 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | Callba Notice: -* If your data source change and it affects the number of sections or the number of cells in section, or the height of any sections or cells, you must call [reloadData](#Features) +* If your data source change and it affects the number of sections or the number of cells in section, or the height of any sections or cells, you must call [reloadData](#reloaddata) ## Principle Before we learn advanced usage, we must first understand the basic principles: From 5a632940bd8480bee1ab916bd374c8be4cbed859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=A0=B4=E5=A4=A9=E6=83=8A?= Date: Wed, 10 Jan 2018 18:41:52 +0800 Subject: [PATCH 4/5] Update README-cn.md --- README-cn.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README-cn.md b/README-cn.md index bbdc4b27..a8c0f0c0 100644 --- a/README-cn.md +++ b/README-cn.md @@ -112,7 +112,7 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动 注意: -* 不同于FlatList,LargeList是惰性的,不会立即重新计算布局,当您的数据源改变的时候,影响到以下因素时,必须调用[reloadData](#reloadData)重新布局 +* 不同于FlatList,LargeList是惰性的,不会立即重新计算布局,当您的数据源改变的时候,影响到以下因素时,必须调用[reloadData](#reloaddata)重新布局 1. 头部和尾部高度变化 @@ -308,8 +308,6 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动 1. reloadIndexPath, reloadIndexPaths, reloadAll 都是局部重新加载,因此影响列表的全局属性,比如numberOfSections ,numberOfRowsInSection,heightForSection,heightForCell属性改变,则会导致错乱,请使用reloadData。 - - ### reloadData() 全局重新加载所有数据 From c78ea840cea0bf846681245c3486c301a692aab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E7=A0=B4=E5=A4=A9=E6=83=8A?= Date: Wed, 10 Jan 2018 18:42:19 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 950db9f0..889256b4 100644 --- a/README.md +++ b/README.md @@ -302,8 +302,6 @@ Notice: 1. reloadIndexPath, reloadIndexPaths, reloadAll work partially. They do not work well when the numberOfSections ,numberOfRowsInSection,heightForSection,heightForCell change.Use reloadData instead. - - ### reloadData() Reload all datasource globally.