@camstack/ui-library 0.1.40 → 0.1.41
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/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17987,10 +17987,11 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
|
|
|
17987
17987
|
setStatus(null);
|
|
17988
17988
|
try {
|
|
17989
17989
|
const result = await onAction(field.action, field.key, params);
|
|
17990
|
+
const resultRecord = typeof result === "object" && result !== null ? result : null;
|
|
17990
17991
|
setStatus({
|
|
17991
17992
|
kind: "ok",
|
|
17992
17993
|
text: field.successMessage ? field.successMessage.replace(/\{(\w+)\}/g, (_, k) => {
|
|
17993
|
-
const v =
|
|
17994
|
+
const v = resultRecord?.[k];
|
|
17994
17995
|
return v === void 0 ? "" : String(v);
|
|
17995
17996
|
}) : "Done."
|
|
17996
17997
|
});
|