From 60ee3c22a4bb806722c4072f5b938292f7b001b3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 18 Jan 2024 20:07:00 +0000 Subject: [PATCH] Add support for `prefix` in customapi --- src/widgets/customapi/component.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/widgets/customapi/component.jsx b/src/widgets/customapi/component.jsx index 7e6ad4d7..45e6ea6e 100644 --- a/src/widgets/customapi/component.jsx +++ b/src/widgets/customapi/component.jsx @@ -90,6 +90,11 @@ function formatValue(t, mapping, rawValue) { // nothing } + // Apply fixed prefix. + const prefix = mapping?.prefix; + if (prefix) { + value = `${prefix}${value}`; + } // Apply fixed suffix. const suffix = mapping?.suffix; if (suffix) {