From 1ce6c2aee1c2ca05cfe550260ce774326fb9e76b Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Tue, 10 Aug 2021 15:31:16 +0530 Subject: [PATCH] Add the plain string component forgot last time. --- web/pgadmin/static/js/components/FormComponents.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx index 3254acfad..a44cb4b1b 100644 --- a/web/pgadmin/static/js/components/FormComponents.jsx +++ b/web/pgadmin/static/js/components/FormComponents.jsx @@ -900,6 +900,18 @@ FormInputColor.propTypes = { testcid: PropTypes.string, }; +export function PlainString({controlProps, value}) { + let finalValue = value; + if(controlProps?.formatter) { + finalValue = controlProps.formatter.fromRaw(finalValue); + } + return {finalValue}; +} +PlainString.propTypes = { + controlProps: PropTypes.object, + value: PropTypes.any, +}; + export function FormNote({text, className}) { const classes = useStyles(); return (