@azrico/reactgrid 1.2.17 → 1.2.18

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.18](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.17...v1.2.18) (2023-04-02)
6
+
5
7
  ### [1.2.17](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.16...v1.2.17) (2023-04-02)
6
8
 
7
9
  ### [1.2.16](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.15...v1.2.16) (2023-04-02)
@@ -30,7 +30,7 @@ export declare function get_col_header(obj: any): string;
30
30
  * @returns
31
31
  */
32
32
  export declare function get_row_id(obj: any): any;
33
- export declare function set_row_id(obj: any, val: any): any;
33
+ export declare function set_row_id(obj: any, val: undefined | string): any;
34
34
  /**
35
35
  * Gets default activation key for grid plugin
36
36
  * @returns
@@ -273,7 +273,10 @@ export function get_row_id(obj) {
273
273
  return obj.__table_id || obj.id || '-1';
274
274
  }
275
275
  export function set_row_id(obj, val) {
276
- obj.__table_id = val;
276
+ if (val === undefined)
277
+ delete obj.__table_id;
278
+ else
279
+ obj.__table_id = val;
277
280
  return obj.__table_id;
278
281
  }
279
282
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/reactgrid",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "main": "dist/index.js",
5
5
  "description": "React Datagrid",
6
6
  "author": "Azrideus <MehrdadTavangar@gmail.com>",
@@ -269,8 +269,9 @@ export function get_row_id(obj: any): any {
269
269
  if (typeof obj != 'object') return '-1';
270
270
  return obj.__table_id || obj.id || '-1';
271
271
  }
272
- export function set_row_id(obj: any, val): any {
273
- obj.__table_id = val;
272
+ export function set_row_id(obj: any, val: undefined | string): any {
273
+ if (val === undefined) delete obj.__table_id;
274
+ else obj.__table_id = val;
274
275
  return obj.__table_id;
275
276
  }
276
277