Hi,

PFA minor patch to display value '0'  in Read only text editor.
RM#2138


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/static/js/slickgrid/slick.pgadmin.editors.js 
b/web/pgadmin/static/js/slickgrid/slick.pgadmin.editors.js
index 19ad11d..3ef4f5a 100644
--- a/web/pgadmin/static/js/slickgrid/slick.pgadmin.editors.js
+++ b/web/pgadmin/static/js/slickgrid/slick.pgadmin.editors.js
@@ -550,7 +550,16 @@
     };
 
     this.loadValue = function (item) {
-      defaultValue = item[args.column.field] || "";
+      var value = item[args.column.field];
+      // Check if value is null or undefined
+      if(
+        (value === undefined && typeof value === "undefined")
+        ||
+        (value === undefined && typeof value === "undefined")
+      ) {
+        value = ""
+      }
+      defaultValue = value;
       $input.val(defaultValue);
       $input[0].defaultValue = defaultValue;
       $input.select();
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to