@desynova-digital/components 8.19.30 → 8.19.32

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.
@@ -1094,28 +1094,53 @@ var Table = function (_Component) {
1094
1094
  }, {
1095
1095
  key: "returnTableStatus",
1096
1096
  value: function returnTableStatus() {
1097
- if (this.props.tableLoading) {
1097
+ if (this.props.tableLoading && !this.props.tableLoadingAction) {
1098
1098
  return _react2.default.createElement(
1099
1099
  "div",
1100
1100
  { style: { padding: "10px" } },
1101
1101
  this.tableLoadingFirst()
1102
1102
  );
1103
1103
  } else {
1104
- return _react2.default.createElement(
1105
- "div",
1106
- null,
1107
- _react2.default.createElement(
1108
- Table.Element,
1109
- this.props,
1110
- _react2.default.createElement(Table.Header, {
1111
- theme: this.props.theme,
1112
- columns: this.defaultShowColumns,
1113
- selectedColumns: this.state.showColumnArr,
1114
- onSort: this.props.onSort
1115
- })
1116
- ),
1117
- _react2.default.createElement(_TableErrorScreen2.default, null)
1118
- );
1104
+ if (this.state.items.length == 0) {
1105
+ if (this.props.tableLoading === false) {
1106
+ return _react2.default.createElement(
1107
+ "div",
1108
+ null,
1109
+ _react2.default.createElement(
1110
+ Table.Element,
1111
+ this.props,
1112
+ _react2.default.createElement(Table.Header, {
1113
+ theme: this.props.theme,
1114
+ columns: this.defaultShowColumns,
1115
+ selectedColumns: this.state.showColumnArr,
1116
+ onSort: this.props.onSort
1117
+ })
1118
+ ),
1119
+ _react2.default.createElement(_TableErrorScreen2.default, null)
1120
+ );
1121
+ } else {
1122
+ return _react2.default.createElement(
1123
+ "div",
1124
+ null,
1125
+ _react2.default.createElement(
1126
+ Table.Element,
1127
+ this.props,
1128
+ _react2.default.createElement(Table.Header, {
1129
+ theme: this.props.theme,
1130
+ columns: this.defaultShowColumns,
1131
+ selectedColumns: this.state.showColumnArr,
1132
+ onSort: this.props.onSort
1133
+ })
1134
+ ),
1135
+ _react2.default.createElement(
1136
+ "div",
1137
+ { style: { padding: "10px" } },
1138
+ this.tableLoadingFirst()
1139
+ ),
1140
+ ";"
1141
+ );
1142
+ }
1143
+ }
1119
1144
  }
1120
1145
  }
1121
1146
  }, {
@@ -1134,7 +1159,8 @@ var Table = function (_Component) {
1134
1159
  getTableData = _props2.getTableData,
1135
1160
  downloadAvailable = _props2.downloadAvailable,
1136
1161
  tableLoading = _props2.tableLoading,
1137
- tableLoadingAction = _props2.tableLoadingAction;
1162
+ tableLoadingAction = _props2.tableLoadingAction,
1163
+ filtersStructure = _props2.filtersStructure;
1138
1164
  var _state2 = this.state,
1139
1165
  nestedTable = _state2.nestedTable,
1140
1166
  searchedText = _state2.searchedText,
@@ -1372,7 +1398,7 @@ var Table = function (_Component) {
1372
1398
  })
1373
1399
  ) || _react2.default.createElement(_Shimmer2.default, { height: "24px", width: "30px" })
1374
1400
  ),
1375
- this.props.filtersStructure && this.props.filtersStructure.length && !tableLoading || tableLoadingAction ? _react2.default.createElement(_filter2.default, {
1401
+ this.props.filtersStructure && this.props.filtersStructure.length && !tableLoading || tableLoadingAction && filtersStructure.length ? _react2.default.createElement(_filter2.default, {
1376
1402
  ref: this._filterRef,
1377
1403
  initialFilters: this.props.initialFilters,
1378
1404
  filtersStructure: this.props.filtersStructure,
@@ -1382,7 +1408,7 @@ var Table = function (_Component) {
1382
1408
  filterMessage: this.props.filterMessage,
1383
1409
  handleUserIdFilterChange: this.props.handleUserIdFilterChange,
1384
1410
  userIdsList: this.props.userIdsList
1385
- }) : tableLoading ? _react2.default.createElement(_Shimmer2.default, { height: "24px", width: "30px" }) : null,
1411
+ }) : tableLoading && filtersStructure.length ? _react2.default.createElement(_Shimmer2.default, { height: "24px", width: "30px" }) : null,
1386
1412
  downloadAvailable && (!tableLoading || tableLoading && tableLoadingAction) && _react2.default.createElement(
1387
1413
  "div",
1388
1414
  { className: "refresh-section" },
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "8.19.30",
3
+ "version": "8.19.32",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "8.19.30",
10
+ "@desynova-digital/tokens": "8.19.32",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },