diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js
index 771e3c03..9c443a86 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/static/js/subscription.ui.js
@@ -161,7 +161,8 @@ export default class SubscriptionSchema extends BaseUISchema{
}
},
{
- id: 'password', label: gettext('Password'), type: 'password', maxlength: null,
+ id: 'password', label: gettext('Password'), type: 'password',
+ controlProps: { maxLength: null},
group: gettext('Connection'),
mode: ['create', 'edit'], skipChange: true,
deps: ['connect_now'],
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js
index f25986de..ad10012a 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js
@@ -210,13 +210,16 @@ export default class ServerSchema extends BaseUISchema {
id: 'gss_encrypted', label: gettext('GSS encrypted?'), type: 'switch',
group: gettext('Connection'), mode: ['properties'], visible: obj.isConnected,
},{
- id: 'password', label: gettext('Password'), type: 'password', maxlength: null,
+ id: 'password', label: gettext('Password'), type: 'password',
group: gettext('Connection'),
mode: ['create'],
deps: ['connect_now', 'kerberos_conn'],
visible: function(state) {
return state.connect_now && obj.isNew(state);
},
+ controlProps: {
+ maxLength: null
+ },
disabled: function(state) {return state.kerberos_conn;},
},{
id: 'save_password', label: gettext('Save password?'),
@@ -396,6 +399,9 @@ export default class ServerSchema extends BaseUISchema {
disabled: function(state) {
return !state.use_ssh_tunnel;
},
+ controlProps: {
+ maxLength: null
+ },
readonly: obj.isConnected,
}, {
id: 'save_tunnel_password', label: gettext('Save password?'),
diff --git a/web/pgadmin/browser/static/js/ConnectServerContent.jsx b/web/pgadmin/browser/static/js/ConnectServerContent.jsx
index 7ddb4d13..547fafae 100644
--- a/web/pgadmin/browser/static/js/ConnectServerContent.jsx
+++ b/web/pgadmin/browser/static/js/ConnectServerContent.jsx
@@ -62,7 +62,7 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight}
- onTextChange(e, 'tunnel_password')} onKeyDown={(e)=>onKeyDown(e)} />
@@ -85,7 +85,7 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight}
/* Set only if no tunnel password asked */
firstEleRef.current = ele;
}
- }} type="password" value={formData['password']} maxLength={null}
+ }} type="password" value={formData['password']} controlProps={{maxLength:null}}
onChange={(e)=>onTextChange(e, 'password')} onKeyDown={(e)=>onKeyDown(e)}/>
diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx
index 0f85d0fe..0929b252 100644
--- a/web/pgadmin/static/js/components/FormComponents.jsx
+++ b/web/pgadmin/static/js/components/FormComponents.jsx
@@ -326,7 +326,9 @@ FormInputDateTimePicker.propTypes = {
/* Use forwardRef to pass ref prop to OutlinedInput */
export const InputText = forwardRef(({
- cid, helpid, readonly, disabled, maxlength = 255, value, onChange, controlProps, type, ...props }, ref) => {
+ cid, helpid, readonly, disabled, value, onChange, controlProps, type, ...props }, ref) => {
+
+ const maxlength = typeof(controlProps?.maxLength) != 'undefined' ? controlProps.maxLength : 255;
const classes = useStyles();
const patterns = {
@@ -388,7 +390,6 @@ InputText.propTypes = {
label: PropTypes.string,
readonly: PropTypes.bool,
disabled: PropTypes.bool,
- maxlength: PropTypes.number,
value: PropTypes.any,
onChange: PropTypes.func,
controlProps: PropTypes.object,
diff --git a/web/regression/javascript/components/FormComponents.spec.js b/web/regression/javascript/components/FormComponents.spec.js
index d53dd41a..be70cb27 100644
--- a/web/regression/javascript/components/FormComponents.spec.js
+++ b/web/regression/javascript/components/FormComponents.spec.js
@@ -74,10 +74,11 @@ describe('FormComponents', ()=>{
/* InputText */
readonly={false}
disabled={false}
- maxlength={50}
+
value={'thevalue'}
controlProps={{
- extraprop: 'test'
+ extraprop: 'test',
+ maxLength: 50,
}}
/>);
});