@azrico/reactgrid 1.2.29 → 1.2.31
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 +4 -3
- package/package.json +1 -1
- package/src/func/func_grid.ts +4 -3
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.31](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.30...v1.2.31) (2023-04-03)
|
|
6
|
+
|
|
7
|
+
### [1.2.30](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.29...v1.2.30) (2023-04-03)
|
|
8
|
+
|
|
5
9
|
### [1.2.29](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.28...v1.2.29) (2023-04-03)
|
|
6
10
|
|
|
7
11
|
### [1.2.28](https://github.com/Azrideus/azrico-reactgrid/compare/v1.2.27...v1.2.28) (2023-04-03)
|
|
@@ -260,12 +260,13 @@ function get_col_header(obj) {
|
|
|
260
260
|
* @returns
|
|
261
261
|
*/
|
|
262
262
|
function get_row_id(obj) {
|
|
263
|
-
if (!obj) return
|
|
263
|
+
if (!obj) return undefined;
|
|
264
264
|
if (typeof obj == 'string') return obj;
|
|
265
|
-
if (typeof obj != 'object') return
|
|
266
|
-
return obj.__table_id || obj.id ||
|
|
265
|
+
if (typeof obj != 'object') return undefined;
|
|
266
|
+
return obj.__table_id || obj.id || undefined;
|
|
267
267
|
}
|
|
268
268
|
function set_row_id(obj, val) {
|
|
269
|
+
if (typeof obj != 'object') return false;
|
|
269
270
|
if (val === undefined) delete obj.__table_id;else obj.__table_id = val;
|
|
270
271
|
return obj.__table_id;
|
|
271
272
|
}
|
package/package.json
CHANGED
package/src/func/func_grid.ts
CHANGED
|
@@ -264,12 +264,13 @@ export function get_col_header(obj: any): string {
|
|
|
264
264
|
* @returns
|
|
265
265
|
*/
|
|
266
266
|
export function get_row_id(obj: any): any {
|
|
267
|
-
if (!obj) return
|
|
267
|
+
if (!obj) return undefined;
|
|
268
268
|
if (typeof obj == 'string') return obj;
|
|
269
|
-
if (typeof obj != 'object') return
|
|
270
|
-
return obj.__table_id || obj.id ||
|
|
269
|
+
if (typeof obj != 'object') return undefined;
|
|
270
|
+
return obj.__table_id || obj.id || undefined;
|
|
271
271
|
}
|
|
272
272
|
export function set_row_id(obj: any, val: undefined | string): any {
|
|
273
|
+
if (typeof obj != 'object') return false;
|
|
273
274
|
if (val === undefined) delete obj.__table_id;
|
|
274
275
|
else obj.__table_id = val;
|
|
275
276
|
return obj.__table_id;
|