List integrate pagination functional fixed: #9303 #10135
Merged
Conversation
Deploy preview for ant-design ready! Built with commit 1663bf5 |
Codecov Report
@@ Coverage Diff @@
## feature-3.5.0 #10135 +/- ##
=================================================
+ Coverage 86.28% 86.34% +0.05%
=================================================
Files 197 197
Lines 4741 4761 +20
Branches 1322 1326 +4
=================================================
+ Hits 4091 4111 +20
Misses 647 647
Partials 3 3
Continue to review full report at Codecov.
|
); | ||
} | ||
} | ||
|
nikogu
Apr 19, 2018
Author
Contributor
截取数据的逻辑是,如果当前获取的数据数目大于当前所需要截取的数量,说明需要进行数据截取,反之则不截取(出现在异步加载情况的数据的情况下)
截取数据的逻辑是,如果当前获取的数据数目大于当前所需要截取的数量,说明需要进行数据截取,反之则不截取(出现在异步加载情况的数据的情况下)
@@ -163,24 +195,54 @@ export default class List extends React.Component<ListProps> { | |||
[`${prefixCls}-something-after-last-item`]: this.isSomethingAfterLastItem(), | |||
}); | |||
|
|||
this.defaultPaginationProps.total = dataSource.length; | |||
this.defaultPaginationProps.current = paginationCurrent; |
nikogu
Apr 19, 2018
Author
Contributor
由于默认是不展示分页的,所以需要在 render 中根据 props 情况进行分页的属性设置。
由于默认是不展示分页的,所以需要在 render 中根据 props 情况进行分页的属性设置。
); | ||
if (paginationProps.current > largestPage) { | ||
paginationProps.current = largestPage; | ||
} |
nikogu
Apr 19, 2018
Author
Contributor
当 current 大于允许的最大分页时,改 current 为最大分页
当 current 大于允许的最大分页时,改 current 为最大分页
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
#9303