@dhis2/analytics 24.4.1 → 24.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [24.4.2](https://github.com/dhis2/analytics/compare/v24.4.1...v24.4.2) (2023-01-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* use page number from response ([#1413](https://github.com/dhis2/analytics/issues/1413)) ([b5523bf](https://github.com/dhis2/analytics/commit/b5523bf9701198645a7029ea48e568ab7d4859c5))
|
|
7
|
+
|
|
1
8
|
## [24.4.1](https://github.com/dhis2/analytics/compare/v24.4.0...v24.4.1) (2023-01-13)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -151,7 +151,12 @@ const OpenFileDialog = _ref2 => {
|
|
|
151
151
|
data,
|
|
152
152
|
refetch
|
|
153
153
|
} = (0, _appRuntime.useDataQuery)(filesQuery, {
|
|
154
|
-
lazy: true
|
|
154
|
+
lazy: true,
|
|
155
|
+
onComplete: response => {
|
|
156
|
+
if (page !== response.files.pager.page) {
|
|
157
|
+
setPage(response.files.pager.page);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
155
160
|
});
|
|
156
161
|
|
|
157
162
|
const resetFilters = () => {
|
|
@@ -322,7 +327,7 @@ const OpenFileDialog = _ref2 => {
|
|
|
322
327
|
})))), (data === null || data === void 0 ? void 0 : data.files[_utils.AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
323
328
|
className: "jsx-".concat(_OpenFileDialogStyles.styles.__hash) + " " + "pagination-controls"
|
|
324
329
|
}, /*#__PURE__*/_react.default.createElement(_PaginationControls.PaginationControls, {
|
|
325
|
-
page: page,
|
|
330
|
+
page: data.files.pager.page,
|
|
326
331
|
pager: data.files.pager,
|
|
327
332
|
onPageChange: setPage
|
|
328
333
|
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
@@ -124,7 +124,12 @@ export const OpenFileDialog = _ref2 => {
|
|
|
124
124
|
data,
|
|
125
125
|
refetch
|
|
126
126
|
} = useDataQuery(filesQuery, {
|
|
127
|
-
lazy: true
|
|
127
|
+
lazy: true,
|
|
128
|
+
onComplete: response => {
|
|
129
|
+
if (page !== response.files.pager.page) {
|
|
130
|
+
setPage(response.files.pager.page);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
128
133
|
});
|
|
129
134
|
|
|
130
135
|
const resetFilters = () => {
|
|
@@ -295,7 +300,7 @@ export const OpenFileDialog = _ref2 => {
|
|
|
295
300
|
})))), (data === null || data === void 0 ? void 0 : data.files[AOTypeMap[type].apiEndpoint].length) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
296
301
|
className: "jsx-".concat(styles.__hash) + " " + "pagination-controls"
|
|
297
302
|
}, /*#__PURE__*/React.createElement(PaginationControls, {
|
|
298
|
-
page: page,
|
|
303
|
+
page: data.files.pager.page,
|
|
299
304
|
pager: data.files.pager,
|
|
300
305
|
onPageChange: setPage
|
|
301
306
|
}))), /*#__PURE__*/React.createElement(_JSXStyle, {
|