@azrico/reactgrid 1.2.6 → 1.2.8
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 +4 -0
- package/dist/src/func/func_grid.js +6 -3
- package/package.json +1 -1
- package/src/func/func_grid.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.2.8](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.7...v1.2.8) (2023-02-26)
|
|
6
|
+
|
|
7
|
+
### [1.2.7](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.6...v1.2.7) (2023-02-26)
|
|
8
|
+
|
|
5
9
|
### 1.2.6 (2023-02-26)
|
|
6
10
|
|
|
7
11
|
|
|
@@ -14,7 +14,6 @@ exports.validateCache = validateCache;
|
|
|
14
14
|
var _BoolEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/BoolEditor"));
|
|
15
15
|
var _NumericEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/NumericEditor"));
|
|
16
16
|
var _SelectEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/SelectEditor"));
|
|
17
|
-
var _func_child = require("./func_child");
|
|
18
17
|
var _object = require("@azrico/object");
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
19
|
const defaultColumnOptions = {
|
|
@@ -54,8 +53,12 @@ async function ApplyDataSource(datasource, props) {
|
|
|
54
53
|
};
|
|
55
54
|
if (!Array.isArray(result_data.data)) result_data.data = [result_data.data];
|
|
56
55
|
//no need to fix parent/child when using cache (it should be already fixed)
|
|
57
|
-
if (!isUsingCache && props.allowChildRows)
|
|
58
|
-
|
|
56
|
+
if (!isUsingCache && props.allowChildRows) {
|
|
57
|
+
//result_data.data = fix_parent_child_relations(result_data.data);
|
|
58
|
+
}
|
|
59
|
+
if (!result_data.count) {
|
|
60
|
+
result_data.count = result_data.data.length;
|
|
61
|
+
}
|
|
59
62
|
//update cache
|
|
60
63
|
props.cached_data.current = result_data;
|
|
61
64
|
return result_data;
|
package/package.json
CHANGED
package/src/func/func_grid.ts
CHANGED
|
@@ -51,10 +51,12 @@ export async function ApplyDataSource(datasource, props) {
|
|
|
51
51
|
if (!Array.isArray(result_data.data)) result_data.data = [result_data.data];
|
|
52
52
|
|
|
53
53
|
//no need to fix parent/child when using cache (it should be already fixed)
|
|
54
|
-
if (!isUsingCache && props.allowChildRows)
|
|
55
|
-
result_data.data = fix_parent_child_relations(result_data.data);
|
|
56
|
-
|
|
57
|
-
if (!result_data.count)
|
|
54
|
+
if (!isUsingCache && props.allowChildRows) {
|
|
55
|
+
//result_data.data = fix_parent_child_relations(result_data.data);
|
|
56
|
+
}
|
|
57
|
+
if (!result_data.count) {
|
|
58
|
+
result_data.count = (result_data.data as Array<any>).length;
|
|
59
|
+
}
|
|
58
60
|
|
|
59
61
|
//update cache
|
|
60
62
|
props.cached_data.current = result_data;
|