@carbon/ibm-products 2.42.1-canary.17 → 2.42.1-canary.18
Sign up to get free protection for your applications and to get access to all the features.
package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js
CHANGED
@@ -74,7 +74,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
74
74
|
};
|
75
75
|
var onCheckboxCheck = function onCheckboxCheck(col, value) {
|
76
76
|
var changedDefinitions = columnObjects.map(function (definition) {
|
77
|
-
if (Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) {
|
77
|
+
if ((Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) && definition.canFilter && !definition.disabled) {
|
78
78
|
return _objectSpread2(_objectSpread2({}, definition), {}, {
|
79
79
|
isVisible: value
|
80
80
|
});
|
@@ -98,9 +98,12 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
98
98
|
useEffect(function () {
|
99
99
|
var notFilterableCount = columnObjects.filter(function (col) {
|
100
100
|
return !col.canFilter;
|
101
|
-
});
|
102
|
-
|
103
|
-
|
101
|
+
}).length;
|
102
|
+
var actionCount = columnObjects.filter(function (col) {
|
103
|
+
return col.id === 'actions';
|
104
|
+
}).length;
|
105
|
+
setVisibleColumnsCount(getVisibleColumnsCount() - notFilterableCount - actionCount);
|
106
|
+
setTotalColumns(columnObjects.length - notFilterableCount - actionCount);
|
104
107
|
}, [getVisibleColumnsCount, columnObjects]);
|
105
108
|
return /*#__PURE__*/React__default.createElement(TearsheetNarrow, {
|
106
109
|
className: "".concat(blockClass, "__customize-columns-tearsheet"),
|
package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js
CHANGED
@@ -82,7 +82,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
82
82
|
};
|
83
83
|
var onCheckboxCheck = function onCheckboxCheck(col, value) {
|
84
84
|
var changedDefinitions = columnObjects.map(function (definition) {
|
85
|
-
if (Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) {
|
85
|
+
if ((Array.isArray(col) && col.indexOf(definition) != -1 || definition.id === col.id) && definition.canFilter && !definition.disabled) {
|
86
86
|
return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, definition), {}, {
|
87
87
|
isVisible: value
|
88
88
|
});
|
@@ -106,9 +106,12 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
|
|
106
106
|
React.useEffect(function () {
|
107
107
|
var notFilterableCount = columnObjects.filter(function (col) {
|
108
108
|
return !col.canFilter;
|
109
|
-
});
|
110
|
-
|
111
|
-
|
109
|
+
}).length;
|
110
|
+
var actionCount = columnObjects.filter(function (col) {
|
111
|
+
return col.id === 'actions';
|
112
|
+
}).length;
|
113
|
+
setVisibleColumnsCount(getVisibleColumnsCount() - notFilterableCount - actionCount);
|
114
|
+
setTotalColumns(columnObjects.length - notFilterableCount - actionCount);
|
112
115
|
}, [getVisibleColumnsCount, columnObjects]);
|
113
116
|
return /*#__PURE__*/React__default["default"].createElement(TearsheetNarrow.TearsheetNarrow, {
|
114
117
|
className: "".concat(blockClass, "__customize-columns-tearsheet"),
|
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.42.1-canary.
|
4
|
+
"version": "2.42.1-canary.18+07b412455",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -121,5 +121,5 @@
|
|
121
121
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
122
122
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
123
123
|
},
|
124
|
-
"gitHead": "
|
124
|
+
"gitHead": "07b4124551093f8dc2f4db978201feecdace2e22"
|
125
125
|
}
|