qbs-react-grid 1.0.36 → 1.0.38
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.
- package/es/qbsTable/CustomTableCell.js +1 -1
- package/es/qbsTable/QbsTable.js +22 -20
- package/es/qbsTable/commontypes.d.ts +1 -1
- package/lib/qbsTable/CustomTableCell.js +1 -1
- package/lib/qbsTable/QbsTable.js +22 -20
- package/lib/qbsTable/commontypes.d.ts +1 -1
- package/package.json +1 -1
- package/src/qbsTable/CustomTableCell.tsx +1 -1
- package/src/qbsTable/QbsTable.tsx +3 -3
- package/src/qbsTable/commontypes.ts +1 -1
|
@@ -82,7 +82,7 @@ export var CustomTableCell = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
82
82
|
link = _ref4.link,
|
|
83
83
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
84
84
|
return /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
85
|
-
title: renderCell ? (_renderCell = renderCell(rowData)) === null || _renderCell === void 0 ? void 0 : _renderCell.
|
|
85
|
+
title: renderCell ? (_renderCell = renderCell(rowData)) === null || _renderCell === void 0 ? void 0 : _renderCell.toolTip : toolTip
|
|
86
86
|
}, /*#__PURE__*/React.createElement(Cell, _extends({}, props, {
|
|
87
87
|
dataKey: dataKey
|
|
88
88
|
}), link ? /*#__PURE__*/React.createElement("a", {
|
package/es/qbsTable/QbsTable.js
CHANGED
|
@@ -152,9 +152,9 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
152
152
|
useEffect(function () {
|
|
153
153
|
handleColumnToggle === null || handleColumnToggle === void 0 ? void 0 : handleColumnToggle(columns);
|
|
154
154
|
}, [columns, handleColumnToggle]);
|
|
155
|
-
var handleClear = function handleClear() {
|
|
155
|
+
var handleClear = function handleClear(_ref2) {
|
|
156
156
|
setCheckedKeys([]);
|
|
157
|
-
handleChecked();
|
|
157
|
+
handleChecked([]);
|
|
158
158
|
};
|
|
159
159
|
var toolbarProps = {
|
|
160
160
|
title: title,
|
|
@@ -234,23 +234,23 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
234
234
|
return largestCellLength;
|
|
235
235
|
}
|
|
236
236
|
var columnsRendered = useMemo(function () {
|
|
237
|
-
return (columns != null ? columns : []).map(function (
|
|
238
|
-
var title =
|
|
239
|
-
field =
|
|
240
|
-
resizable =
|
|
241
|
-
sortable =
|
|
242
|
-
colWidth =
|
|
243
|
-
align =
|
|
244
|
-
grouped =
|
|
245
|
-
groupheader =
|
|
246
|
-
fixed =
|
|
247
|
-
children =
|
|
248
|
-
customCell =
|
|
249
|
-
renderCell =
|
|
250
|
-
isVisible =
|
|
251
|
-
link =
|
|
252
|
-
rowClick =
|
|
253
|
-
sortKey =
|
|
237
|
+
return (columns != null ? columns : []).map(function (_ref3) {
|
|
238
|
+
var title = _ref3.title,
|
|
239
|
+
field = _ref3.field,
|
|
240
|
+
resizable = _ref3.resizable,
|
|
241
|
+
sortable = _ref3.sortable,
|
|
242
|
+
colWidth = _ref3.colWidth,
|
|
243
|
+
align = _ref3.align,
|
|
244
|
+
grouped = _ref3.grouped,
|
|
245
|
+
groupheader = _ref3.groupheader,
|
|
246
|
+
fixed = _ref3.fixed,
|
|
247
|
+
children = _ref3.children,
|
|
248
|
+
customCell = _ref3.customCell,
|
|
249
|
+
renderCell = _ref3.renderCell,
|
|
250
|
+
isVisible = _ref3.isVisible,
|
|
251
|
+
link = _ref3.link,
|
|
252
|
+
rowClick = _ref3.rowClick,
|
|
253
|
+
sortKey = _ref3.sortKey;
|
|
254
254
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isVisible && /*#__PURE__*/React.createElement(React.Fragment, null, grouped ? /*#__PURE__*/React.createElement(ColumnGroup, {
|
|
255
255
|
header: groupheader,
|
|
256
256
|
fixed: fixed,
|
|
@@ -364,7 +364,9 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
364
364
|
onChange: handleCheckAll,
|
|
365
365
|
id: "checkbox-all",
|
|
366
366
|
className: "qbs-table-checkbox-input " + classes.tableCheckBoxClass,
|
|
367
|
-
checked: (
|
|
367
|
+
checked: data.every(function (item) {
|
|
368
|
+
return checkedKeys.includes(item.id);
|
|
369
|
+
})
|
|
368
370
|
}), /*#__PURE__*/React.createElement("label", {
|
|
369
371
|
htmlFor: "checkbox-all"
|
|
370
372
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
@@ -90,7 +90,7 @@ var CustomTableCell = /*#__PURE__*/_react["default"].memo(function (_ref4) {
|
|
|
90
90
|
link = _ref4.link,
|
|
91
91
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref4, _excluded3);
|
|
92
92
|
return /*#__PURE__*/_react["default"].createElement(_ToolTip["default"], {
|
|
93
|
-
title: renderCell ? (_renderCell = renderCell(rowData)) === null || _renderCell === void 0 ? void 0 : _renderCell.
|
|
93
|
+
title: renderCell ? (_renderCell = renderCell(rowData)) === null || _renderCell === void 0 ? void 0 : _renderCell.toolTip : toolTip
|
|
94
94
|
}, /*#__PURE__*/_react["default"].createElement(_Cell["default"], (0, _extends2["default"])({}, props, {
|
|
95
95
|
dataKey: dataKey
|
|
96
96
|
}), link ? /*#__PURE__*/_react["default"].createElement("a", {
|
package/lib/qbsTable/QbsTable.js
CHANGED
|
@@ -159,9 +159,9 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
159
159
|
(0, _react.useEffect)(function () {
|
|
160
160
|
handleColumnToggle === null || handleColumnToggle === void 0 ? void 0 : handleColumnToggle(columns);
|
|
161
161
|
}, [columns, handleColumnToggle]);
|
|
162
|
-
var handleClear = function handleClear() {
|
|
162
|
+
var handleClear = function handleClear(_ref2) {
|
|
163
163
|
setCheckedKeys([]);
|
|
164
|
-
handleChecked();
|
|
164
|
+
handleChecked([]);
|
|
165
165
|
};
|
|
166
166
|
var toolbarProps = {
|
|
167
167
|
title: title,
|
|
@@ -241,23 +241,23 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
241
241
|
return largestCellLength;
|
|
242
242
|
}
|
|
243
243
|
var columnsRendered = (0, _react.useMemo)(function () {
|
|
244
|
-
return (columns != null ? columns : []).map(function (
|
|
245
|
-
var title =
|
|
246
|
-
field =
|
|
247
|
-
resizable =
|
|
248
|
-
sortable =
|
|
249
|
-
colWidth =
|
|
250
|
-
align =
|
|
251
|
-
grouped =
|
|
252
|
-
groupheader =
|
|
253
|
-
fixed =
|
|
254
|
-
children =
|
|
255
|
-
customCell =
|
|
256
|
-
renderCell =
|
|
257
|
-
isVisible =
|
|
258
|
-
link =
|
|
259
|
-
rowClick =
|
|
260
|
-
sortKey =
|
|
244
|
+
return (columns != null ? columns : []).map(function (_ref3) {
|
|
245
|
+
var title = _ref3.title,
|
|
246
|
+
field = _ref3.field,
|
|
247
|
+
resizable = _ref3.resizable,
|
|
248
|
+
sortable = _ref3.sortable,
|
|
249
|
+
colWidth = _ref3.colWidth,
|
|
250
|
+
align = _ref3.align,
|
|
251
|
+
grouped = _ref3.grouped,
|
|
252
|
+
groupheader = _ref3.groupheader,
|
|
253
|
+
fixed = _ref3.fixed,
|
|
254
|
+
children = _ref3.children,
|
|
255
|
+
customCell = _ref3.customCell,
|
|
256
|
+
renderCell = _ref3.renderCell,
|
|
257
|
+
isVisible = _ref3.isVisible,
|
|
258
|
+
link = _ref3.link,
|
|
259
|
+
rowClick = _ref3.rowClick,
|
|
260
|
+
sortKey = _ref3.sortKey;
|
|
261
261
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isVisible && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, grouped ? /*#__PURE__*/_react["default"].createElement(_ColumnGroup["default"], {
|
|
262
262
|
header: groupheader,
|
|
263
263
|
fixed: fixed,
|
|
@@ -371,7 +371,9 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
371
371
|
onChange: handleCheckAll,
|
|
372
372
|
id: "checkbox-all",
|
|
373
373
|
className: "qbs-table-checkbox-input " + classes.tableCheckBoxClass,
|
|
374
|
-
checked: (
|
|
374
|
+
checked: data.every(function (item) {
|
|
375
|
+
return checkedKeys.includes(item.id);
|
|
376
|
+
})
|
|
375
377
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
376
378
|
htmlFor: "checkbox-all"
|
|
377
379
|
}, /*#__PURE__*/_react["default"].createElement("svg", {
|
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ export const ExpandCell: React.FC<any> = React.memo(
|
|
|
64
64
|
export const CustomTableCell: React.FC<any> = React.memo(
|
|
65
65
|
({ rowData, renderCell, toolTip, dataKey, onChange, rowClick, link, ...props }) => {
|
|
66
66
|
return (
|
|
67
|
-
<TooltipComponent title={renderCell ? renderCell(rowData)?.
|
|
67
|
+
<TooltipComponent title={renderCell ? renderCell(rowData)?.toolTip : toolTip}>
|
|
68
68
|
<Cell {...props} dataKey={dataKey}>
|
|
69
69
|
{link ? (
|
|
70
70
|
<a onClick={() => rowClick?.(rowData)} className="qbs-table-row-link">
|
|
@@ -140,9 +140,9 @@ const QbsTable: React.FC<QbsTableProps> = ({
|
|
|
140
140
|
useEffect(() => {
|
|
141
141
|
handleColumnToggle?.(columns);
|
|
142
142
|
}, [columns, handleColumnToggle]);
|
|
143
|
-
const handleClear = () => {
|
|
143
|
+
const handleClear = ([]) => {
|
|
144
144
|
setCheckedKeys([]);
|
|
145
|
-
handleChecked();
|
|
145
|
+
handleChecked([]);
|
|
146
146
|
};
|
|
147
147
|
const toolbarProps = {
|
|
148
148
|
title: title,
|
|
@@ -389,7 +389,7 @@ const QbsTable: React.FC<QbsTableProps> = ({
|
|
|
389
389
|
onChange={handleCheckAll}
|
|
390
390
|
id={`checkbox-all`}
|
|
391
391
|
className={`qbs-table-checkbox-input ${classes.tableCheckBoxClass}`}
|
|
392
|
-
checked={
|
|
392
|
+
checked={data.every(item => checkedKeys.includes(item.id))}
|
|
393
393
|
/>
|
|
394
394
|
<label htmlFor={`checkbox-all`}>
|
|
395
395
|
<svg
|