@tecsinapse/react-web-kit 1.17.4 → 1.17.5

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.17.5](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.17.4...@tecsinapse/react-web-kit@1.17.5) (2022-06-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * shallow copy on remove datagrid index ([3c4d087](https://github.com/tecsinapse/design-system/commit/3c4d087f04e57f4c0d20d2cfd93c776c0a217052))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.17.4](https://github.com/tecsinapse/design-system/compare/@tecsinapse/react-web-kit@1.17.3...@tecsinapse/react-web-kit@1.17.4) (2022-06-08)
7
18
 
8
19
 
@@ -7,7 +7,7 @@ exports.removeElement = removeElement;
7
7
  exports.getData = void 0;
8
8
 
9
9
  function removeElement(arr, index) {
10
- const data = arr;
10
+ const data = [...arr];
11
11
  data.splice(index, 1);
12
12
  return data;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/organisms/DataGrid/utils.ts"],"names":["removeElement","arr","index","data","splice","getData","rowsCount","page","rowsPerPage","pagination","slice"],"mappings":";;;;;;;;AAAO,SAASA,aAAT,CAA0BC,GAA1B,EAAoCC,KAApC,EAAwD;AAC7D,QAAMC,IAAI,GAAGF,GAAb;AACAE,EAAAA,IAAI,CAACC,MAAL,CAAYF,KAAZ,EAAmB,CAAnB;AACA,SAAOC,IAAP;AACD;;AAEM,MAAME,OAAO,GAAG,CACrBF,IADqB,EAErBG,SAFqB,EAGrBC,IAHqB,EAIrBC,WAJqB,EAKrBC,UALqB,KAOrBH,SAAS,IAAI,CAACG,UAAd,GACIN,IADJ,GAEIA,IAAI,CAACO,KAAL,CAAWH,IAAI,GAAGC,WAAlB,EAA+BD,IAAI,GAAGC,WAAP,GAAqBA,WAApD,CATC","sourcesContent":["export function removeElement<T>(arr: T[], index: number): T[] {\n const data = arr; // Sometimes looks like the data is removed from table, check if this is a bug. I'm copying the arr to a new variable for security reasons\n data.splice(index, 1);\n return data;\n}\n\nexport const getData = <Data>(\n data: Data[],\n rowsCount: number | undefined,\n page: number,\n rowsPerPage: number,\n pagination: boolean\n): Data[] =>\n rowsCount || !pagination\n ? data\n : data.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);\n"],"file":"utils.js"}
1
+ {"version":3,"sources":["../../../../src/components/organisms/DataGrid/utils.ts"],"names":["removeElement","arr","index","data","splice","getData","rowsCount","page","rowsPerPage","pagination","slice"],"mappings":";;;;;;;;AAAO,SAASA,aAAT,CAA0BC,GAA1B,EAAoCC,KAApC,EAAwD;AAC7D,QAAMC,IAAI,GAAG,CAAC,GAAGF,GAAJ,CAAb;AACAE,EAAAA,IAAI,CAACC,MAAL,CAAYF,KAAZ,EAAmB,CAAnB;AACA,SAAOC,IAAP;AACD;;AAEM,MAAME,OAAO,GAAG,CACrBF,IADqB,EAErBG,SAFqB,EAGrBC,IAHqB,EAIrBC,WAJqB,EAKrBC,UALqB,KAOrBH,SAAS,IAAI,CAACG,UAAd,GACIN,IADJ,GAEIA,IAAI,CAACO,KAAL,CAAWH,IAAI,GAAGC,WAAlB,EAA+BD,IAAI,GAAGC,WAAP,GAAqBA,WAApD,CATC","sourcesContent":["export function removeElement<T>(arr: T[], index: number): T[] {\n const data = [...arr]; // Sometimes looks like the data is removed from table, check if this is a bug. I'm copying the arr to a new variable for security reasons\n data.splice(index, 1);\n return data;\n}\n\nexport const getData = <Data>(\n data: Data[],\n rowsCount: number | undefined,\n page: number,\n rowsPerPage: number,\n pagination: boolean\n): Data[] =>\n rowsCount || !pagination\n ? data\n : data.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);\n"],"file":"utils.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-web-kit",
3
3
  "description": "TecSinapse React components",
4
- "version": "1.17.4",
4
+ "version": "1.17.5",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -33,5 +33,5 @@
33
33
  "react-dom": "^16.8.0 || ^17.0.0",
34
34
  "react-native-web": "^0.17.1"
35
35
  },
36
- "gitHead": "de45e97bbf6789a78945883eb0ca38a63d7c3e36"
36
+ "gitHead": "8b4ecc4fc34244a08a303761dca9233e906780a0"
37
37
  }
@@ -1,5 +1,5 @@
1
1
  export function removeElement<T>(arr: T[], index: number): T[] {
2
- const data = arr; // Sometimes looks like the data is removed from table, check if this is a bug. I'm copying the arr to a new variable for security reasons
2
+ const data = [...arr]; // Sometimes looks like the data is removed from table, check if this is a bug. I'm copying the arr to a new variable for security reasons
3
3
  data.splice(index, 1);
4
4
  return data;
5
5
  }