@finema/core 1.4.150 → 1.4.151
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/helpers/apiPageHelper.js +13 -9
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -105,15 +105,19 @@ export const apiFetchHelper = async (state, onUpdateStatus, onUpdateOptions, onU
|
|
|
105
105
|
primary: opts.primary ?? "id",
|
|
106
106
|
_status: void 0
|
|
107
107
|
});
|
|
108
|
-
const getOptions = (data) =>
|
|
109
|
-
...
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
const getOptions = (data) => {
|
|
109
|
+
const { total, limit: limit2, ...more } = data;
|
|
110
|
+
return {
|
|
111
|
+
...state().options,
|
|
112
|
+
...more,
|
|
113
|
+
currentPageCount: state().items?.length || 0,
|
|
114
|
+
currentPage: page,
|
|
115
|
+
totalCount: total,
|
|
116
|
+
limit: limit2,
|
|
117
|
+
search: query,
|
|
118
|
+
totalPage: Math.ceil(total / data.limit)
|
|
119
|
+
};
|
|
120
|
+
};
|
|
117
121
|
const reqOptions = {
|
|
118
122
|
...opts.getBaseRequestOptions?.() || {},
|
|
119
123
|
...opts.fetch?.getRequestOptions?.(page, query, opts) ?? {}
|