()
| 105 | } |
| 106 | |
| 107 | function onLoadMore() { |
| 108 | setLoading(true) |
| 109 | setList( |
| 110 | data.concat( |
| 111 | [...new Array(pageSize)].map(() => ({ |
| 112 | value: "", |
| 113 | from: "", |
| 114 | loading: true, |
| 115 | expand: false |
| 116 | })) |
| 117 | ) |
| 118 | ) |
| 119 | pageNumber += 1 |
| 120 | let records = paginate() |
| 121 | const newData = data.concat(records) |
| 122 | setData(newData) |
| 123 | setList(newData) |
| 124 | setLoading(false) |
| 125 | window.dispatchEvent(new Event("resize")) |
| 126 | } |
| 127 | |
| 128 | const loadMore = |
| 129 | !initLoading && !loading && isMore ? ( |
nothing calls this directly
no test coverage detected