Skip to content

Commit 7b5fb53

Browse files
committed
fix: update list pagination props type
1 parent 6a0f934 commit 7b5fb53

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`List renders empty list 1`] = `<div class="ant-list ant-list-split"><span tag="div" class="ant-spin-nested-loading"><div class="ant-spin-container"><div class="ant-list-empty-text">No data</div></div></span></div>`;
3+
exports[`List renders empty list 1`] = `
4+
<div class="ant-list ant-list-split">
5+
<div class="ant-spin-nested-loading">
6+
<div class="ant-spin-container">
7+
<div class="ant-list-empty-text">No data</div>
8+
</div>
9+
</div>
10+
</div>
11+
`;

components/list/demo/infinite-load.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ export default {
4646
}
4747
},
4848
beforeMount () {
49-
this.getData((res) => {
49+
this.fetchData((res) => {
5050
this.data = res.results
5151
})
5252
},
5353
methods: {
54-
getData (callback) {
54+
fetchData (callback) {
5555
reqwest({
5656
url: fakeDataUrl,
5757
type: 'json',

components/list/demo/infinite-virtualized-load.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ export default {
4848
}
4949
},
5050
beforeMount () {
51-
this.getData((res) => {
51+
this.fetchData((res) => {
5252
this.data = res.results.map((item, index) => ({ ...item, index }))
5353
})
5454
},
5555
methods: {
56-
getData (callback) {
56+
fetchData (callback) {
5757
reqwest({
5858
url: fakeDataUrl,
5959
type: 'json',
@@ -73,7 +73,7 @@ export default {
7373
this.loading = false
7474
return
7575
}
76-
this.getData((res) => {
76+
this.fetchData((res) => {
7777
this.data = data.concat(res.results).map((item, index) => ({ ...item, index }))
7878
this.loading = false
7979
})

components/list/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export const ListProps = () => ({
3939
itemLayout: PropTypes.string,
4040
loading: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
4141
loadMore: PropTypes.any,
42-
pagination: PaginationConfig(),
42+
pagination: PropTypes.oneOfType([
43+
PropTypes.shape(PaginationConfig()).loose,
44+
PropTypes.bool,
45+
]),
4346
prefixCls: PropTypes.string,
4447
rowKey: PropTypes.any,
4548
renderItem: PropTypes.any,

0 commit comments

Comments
 (0)