@camstack/ui-library 0.1.40 → 0.1.42
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.js
CHANGED
|
@@ -17964,10 +17964,11 @@ function AddonActionButtonField({ field, values, disabled, onAction }) {
|
|
|
17964
17964
|
setStatus(null);
|
|
17965
17965
|
try {
|
|
17966
17966
|
const result = await onAction(field.action, field.key, params);
|
|
17967
|
+
const resultRecord = typeof result === "object" && result !== null ? result : null;
|
|
17967
17968
|
setStatus({
|
|
17968
17969
|
kind: "ok",
|
|
17969
17970
|
text: field.successMessage ? field.successMessage.replace(/\{(\w+)\}/g, (_, k) => {
|
|
17970
|
-
const v =
|
|
17971
|
+
const v = resultRecord?.[k];
|
|
17971
17972
|
return v === void 0 ? "" : String(v);
|
|
17972
17973
|
}) : "Done."
|
|
17973
17974
|
});
|