Skip to content

Commit

Permalink
Merge pull request #51 from bolan9999/develop
Browse files Browse the repository at this point in the history
Version 1.2.2
  • Loading branch information
石破天惊 authored Jan 10, 2018
2 parents c55ccdc + c78ea84 commit 49ac32f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For English docs [click here](./README.md)
## 特点
* react-native-largelist 比官网的SectionList CPU和内存占用更少,性能表现更好,在最坏的情况下(比如从第一行直接用代码滑动到第1000行),即使出现白板,也是瞬间消失。
* 支持超大数据源,支持无限列表,支持超快速度滑动。
* 跨平台,兼容iOS和Android。
* 跨平台,兼容iOS和Android。优化自ScrollView,对RN版本兼容性好。
* 支持分组,支持每组头视图自动吸顶,新的Section挂在列表顶部时,支持回调。
* 行组件进入或离开安全区域时可配置回调事件。
* 支持单独的头部、尾部和空视图。
Expand Down Expand Up @@ -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数量变化

## 原理
在了解高级用法之前,我们先要了解下基本原理:

Expand Down Expand Up @@ -332,6 +344,13 @@ onScroll | ({nativeEvent:{contentOffset:{x:number,y:number}}})=> any | | 滑动

## 更新日志

### 版本 1.2.2
* 修复onLargeListDidUpdate的回调时机问题
* 支持TypeScript

### 版本 1.2.1
* 修复左右滑动编辑过程中,上下滑动的问题

### 版本 1.2.0
* 添加左右滑动编辑功能
* 添加空视图
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -332,6 +336,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
Expand Down

0 comments on commit 49ac32f

Please sign in to comment.