@azrico/reactgrid 1.2.7 → 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 CHANGED
@@ -2,6 +2,8 @@
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
+
5
7
  ### [1.2.7](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.6...v1.2.7) (2023-02-26)
6
8
 
7
9
  ### 1.2.6 (2023-02-26)
@@ -53,9 +53,12 @@ async function ApplyDataSource(datasource, props) {
53
53
  };
54
54
  if (!Array.isArray(result_data.data)) result_data.data = [result_data.data];
55
55
  //no need to fix parent/child when using cache (it should be already fixed)
56
- if (!isUsingCache && props.allowChildRows) if (!result_data.count)
56
+ if (!isUsingCache && props.allowChildRows) {
57
57
  //result_data.data = fix_parent_child_relations(result_data.data);
58
+ }
59
+ if (!result_data.count) {
58
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -51,11 +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
- if (!result_data.count)
56
- //result_data.data = fix_parent_child_relations(result_data.data);
57
-
58
- result_data.count = (result_data.data as Array<any>).length;
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
+ }
59
60
 
60
61
  //update cache
61
62
  props.cached_data.current = result_data;