@carbon/ibm-products 2.43.2-canary.240 → 2.43.2-canary.241

Sign up to get free protection for your applications and to get access to all the features.
@@ -108,12 +108,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
108
108
  }) : definition;
109
109
  });
110
110
  setColumnObjects(finalDefinitions);
111
- setDirty();
112
- };
113
- var setDirty = function setDirty() {
114
- if (!isDirty) {
115
- setIsDirty(true);
116
- }
111
+ setIsDirty(selectedColumnsCount !== 0);
117
112
  };
118
113
  var getVisibleColumnsCount = useCallback(function () {
119
114
  return columnObjects.filter(function (col) {
@@ -156,7 +151,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
156
151
  searchText: searchText,
157
152
  setColumnsObject: function setColumnsObject(cols) {
158
153
  setColumnObjects(cols);
159
- setDirty();
154
+ setIsDirty(true);
160
155
  },
161
156
  setSearchText: setSearchText,
162
157
  findColumnPlaceholderLabel: findColumnPlaceholderLabel,
@@ -170,7 +165,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
170
165
  onSelectColumn: onCheckboxCheck,
171
166
  setColumnsObject: function setColumnsObject(cols) {
172
167
  setColumnObjects(cols);
173
- setDirty();
168
+ setIsDirty(getVisibleColumnsCount() !== 0);
174
169
  },
175
170
  selectAllLabel: selectAllLabel,
176
171
  customizeTearsheetHeadingLabel: customizeTearsheetHeadingLabel
@@ -116,12 +116,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
116
116
  }) : definition;
117
117
  });
118
118
  setColumnObjects(finalDefinitions);
119
- setDirty();
120
- };
121
- var setDirty = function setDirty() {
122
- if (!isDirty) {
123
- setIsDirty(true);
124
- }
119
+ setIsDirty(selectedColumnsCount !== 0);
125
120
  };
126
121
  var getVisibleColumnsCount = React.useCallback(function () {
127
122
  return columnObjects.filter(function (col) {
@@ -164,7 +159,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
164
159
  searchText: searchText,
165
160
  setColumnsObject: function setColumnsObject(cols) {
166
161
  setColumnObjects(cols);
167
- setDirty();
162
+ setIsDirty(true);
168
163
  },
169
164
  setSearchText: setSearchText,
170
165
  findColumnPlaceholderLabel: findColumnPlaceholderLabel,
@@ -178,7 +173,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
178
173
  onSelectColumn: onCheckboxCheck,
179
174
  setColumnsObject: function setColumnsObject(cols) {
180
175
  setColumnObjects(cols);
181
- setDirty();
176
+ setIsDirty(getVisibleColumnsCount() !== 0);
182
177
  },
183
178
  selectAllLabel: selectAllLabel,
184
179
  customizeTearsheetHeadingLabel: customizeTearsheetHeadingLabel
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "2.43.2-canary.240+fa31ebbb6",
4
+ "version": "2.43.2-canary.241+2b32f0fa5",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -120,5 +120,5 @@
120
120
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
121
121
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
122
122
  },
123
- "gitHead": "fa31ebbb6629ad952924baf5a7c5d38c36490c75"
123
+ "gitHead": "2b32f0fa54034d347438347e69dfd865c1248f9f"
124
124
  }