@desynova-digital/components 9.0.18 → 9.0.20

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.
@@ -354,17 +354,24 @@ var Filter = function (_Component) {
354
354
  selectedUserIds = _this$state.selectedUserIds;
355
355
  var _this$props = _this.props,
356
356
  applyFilters = _this$props.applyFilters,
357
- initialFilters = _this$props.initialFilters;
357
+ initialFilters = _this$props.initialFilters,
358
+ refreshDashboard = _this$props.refreshDashboard,
359
+ tableLoadingActionFunc = _this$props.tableLoadingActionFunc;
358
360
 
359
361
  _this.toggleFiltersMenu(false);
360
362
  if (forData === 'reset') {
361
- _this.setState({
362
- selectedFiltersObj: initialFilters,
363
- showDropDownOptions: false,
364
- selectedUserIds: []
365
- }, function () {
366
- applyFilters(_this.state.selectedFiltersObj, 'reset');
367
- });
363
+ if (refreshDashboard && tableLoadingActionFunc) {
364
+ tableLoadingActionFunc(true);
365
+ refreshDashboard();
366
+ } else {
367
+ _this.setState({
368
+ selectedFiltersObj: initialFilters,
369
+ showDropDownOptions: false,
370
+ selectedUserIds: []
371
+ }, function () {
372
+ applyFilters(_this.state.selectedFiltersObj, 'reset');
373
+ });
374
+ }
368
375
  } else if (forData === 'cancel') {
369
376
  _this.setState({
370
377
  selectedFiltersObj: _this.props.selectedFilters,
@@ -875,6 +882,8 @@ var Filter = function (_Component) {
875
882
  Filter.propTypes = {
876
883
  theme: _propTypes2.default.oneOf(['light', 'dark', 'nexc']),
877
884
  applyFilters: _propTypes2.default.func,
885
+ refreshDashboard: _propTypes2.default.func,
886
+ tableLoadingActionFunc: _propTypes2.default.func,
878
887
  initialFilters: _propTypes2.default.instanceOf(Object),
879
888
  selectedFilters: _propTypes2.default.instanceOf(Object),
880
889
  filtersStructure: _propTypes2.default.instanceOf(Object),
@@ -1443,6 +1443,8 @@ var Table = function (_Component) {
1443
1443
  theme: this.props.theme,
1444
1444
  ref: this._filterRef,
1445
1445
  initialFilters: this.props.initialFilters,
1446
+ refreshDashboard: this.props.refreshDashboard,
1447
+ tableLoadingActionFunc: this.props.tableLoadingActionFunc,
1446
1448
  filtersStructure: this.props.filtersStructure,
1447
1449
  selectedFilters: this.props.selectedFilters,
1448
1450
  applyFilters: this.props.applyFilters,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "9.0.18",
3
+ "version": "9.0.20",
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": "9.0.18",
10
+ "@desynova-digital/tokens": "9.0.20",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },