@cashub/ui 0.22.10 → 0.22.12
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/package.json +1 -1
- package/table/Table.js +4 -3
package/package.json
CHANGED
package/table/Table.js
CHANGED
|
@@ -67,7 +67,7 @@ const Table = _ref => {
|
|
|
67
67
|
onRowClick(event, rowData);
|
|
68
68
|
}
|
|
69
69
|
}, [onRowClick]);
|
|
70
|
-
const showFullValue = (0, _react.useCallback)((event,
|
|
70
|
+
const showFullValue = (0, _react.useCallback)((event, customContent) => {
|
|
71
71
|
let {
|
|
72
72
|
id
|
|
73
73
|
} = event.target;
|
|
@@ -88,7 +88,7 @@ const Table = _ref => {
|
|
|
88
88
|
id,
|
|
89
89
|
container: popoverContainer,
|
|
90
90
|
target: event.target,
|
|
91
|
-
content:
|
|
91
|
+
content: customContent ? customContent : innerText,
|
|
92
92
|
boundary: tableRef.current
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -166,6 +166,7 @@ const Table = _ref => {
|
|
|
166
166
|
}
|
|
167
167
|
let isCustom = false;
|
|
168
168
|
let renderedData = null;
|
|
169
|
+
const customContent = customPop ? customPop(value, row) : null;
|
|
169
170
|
if (custom && render) {
|
|
170
171
|
// call render function to get custom data(fully)
|
|
171
172
|
isCustom = true;
|
|
@@ -174,7 +175,7 @@ const Table = _ref => {
|
|
|
174
175
|
// call render function to get custom data(part)
|
|
175
176
|
renderedData = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
176
177
|
id: key,
|
|
177
|
-
onClick: event => showFullValue(event,
|
|
178
|
+
onClick: event => showFullValue(event, customContent),
|
|
178
179
|
children: render ? render(value, row) : String(value)
|
|
179
180
|
});
|
|
180
181
|
}
|