@cashub/ui 0.22.8 → 0.22.10
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, customPop) => {
|
|
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: innerText,
|
|
91
|
+
content: customPop ? customPop : innerText,
|
|
92
92
|
boundary: tableRef.current
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -144,6 +144,7 @@ const Table = _ref => {
|
|
|
144
144
|
fieldName,
|
|
145
145
|
render,
|
|
146
146
|
custom,
|
|
147
|
+
customPop,
|
|
147
148
|
...props
|
|
148
149
|
} = column;
|
|
149
150
|
const key = rowIndex + columnIndex.toString();
|
|
@@ -173,7 +174,7 @@ const Table = _ref => {
|
|
|
173
174
|
// call render function to get custom data(part)
|
|
174
175
|
renderedData = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
175
176
|
id: key,
|
|
176
|
-
onClick: showFullValue,
|
|
177
|
+
onClick: event => showFullValue(event, customPop),
|
|
177
178
|
children: render ? render(value, row) : String(value)
|
|
178
179
|
});
|
|
179
180
|
}
|