@ssplib/react-components 0.0.222 → 0.0.223

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.
@@ -100,14 +100,14 @@ function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
100
100
  status: j.statusCode,
101
101
  });
102
102
  else {
103
- console.log('data:', (0, lodash_get_1.default)(j, 'body'));
104
- if (!j || !Array.isArray(j)) {
103
+ let value = dataPath ? (0, lodash_get_1.default)(j, dataPath) : j;
104
+ if (!value || !Array.isArray(value)) {
105
105
  setData({ body: { data: [] } });
106
106
  startData = [];
107
107
  }
108
108
  else {
109
- setData(j);
110
- startData = JSON.parse(JSON.stringify(j));
109
+ setData(value);
110
+ startData = JSON.parse(JSON.stringify(value));
111
111
  const oldFilters = localStorage.getItem(filterStorageName);
112
112
  if (oldFilters) {
113
113
  const filters = JSON.parse(oldFilters);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.222",
3
+ "version": "0.0.223",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",