public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM6976] Allow large comments and resize textarea
Date: Fri, 5 Nov 2021 12:07:58 +0530
Message-ID: <CAM9w-_k-wHaQ00z56tT1qBBXX1u8-gzsJrt=Ktf4kKEOD4+7yw@mail.gmail.com> (raw)

Hi Hackers,

Attached patch will allow textrea's to be resized and have more than 255
chars.
Please review.

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM6976.patch (1.1K, 3-RM6976.patch)
  download | inline diff:
diff --git a/web/pgadmin/static/js/Theme/index.jsx b/web/pgadmin/static/js/Theme/index.jsx
index 3a0118802..3470162ea 100644
--- a/web/pgadmin/static/js/Theme/index.jsx
+++ b/web/pgadmin/static/js/Theme/index.jsx
@@ -101,6 +101,7 @@ basicSettings = createMuiTheme(basicSettings, {
       },
       inputMultiline: {
         padding: basicSettings.spacing(0.75, 1.5),
+        resize: 'auto',
       },
       adornedEnd: {
         paddingRight: basicSettings.spacing(1.5),
diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx
index 9da3e0945..5bad4c7c4 100644
--- a/web/pgadmin/static/js/components/FormComponents.jsx
+++ b/web/pgadmin/static/js/components/FormComponents.jsx
@@ -345,7 +345,7 @@ export const InputText = forwardRef(({
       className={classes.formInput}
       inputProps={{
         id: cid,
-        maxLength: maxlength,
+        maxLength: controlProps?.multiline ? null : maxlength,
         'aria-describedby': helpid,
         ...(type ? {pattern: !_.isUndefined(controlProps) && !_.isUndefined(controlProps.pattern) ? controlProps.pattern : patterns[type]} : {})
       }}


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin][RM6976] Allow large comments and resize textarea
  In-Reply-To: <CAM9w-_k-wHaQ00z56tT1qBBXX1u8-gzsJrt=Ktf4kKEOD4+7yw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox