From 32ce18b832e61967dfbefe68b240b5107b78043f Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 11 Apr 2023 17:08:18 -0600 Subject: [PATCH] Et2NumberReadonly: If value is null, just show nothing --- api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts b/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts index 5c738ba72a..7db500df87 100644 --- a/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts +++ b/api/js/etemplate/Et2Textbox/Et2NumberReadonly.ts @@ -25,9 +25,13 @@ export class Et2NumberReadonly extends Et2TextboxReadonly set_value(val) { - if (""+val !== "") + if(val === null) { - if (typeof this.precision !== 'undefined') + val = ""; + } + else if("" + val !== "") + { + if(typeof this.precision !== 'undefined') { val = parseFloat(val).toFixed(this.precision); }