From 1b549b120d42ef14c81f9ff8ec148d5d54fa60e5 Mon Sep 17 00:00:00 2001 From: Dmitrii Dmitriev <49485678+dmitriev-dyu@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:09:51 +0300 Subject: [PATCH] Fixing condition in the formatter body (#550) The previous one will always be 'true'. --- examples/example2-formatters.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example2-formatters.html b/examples/example2-formatters.html index 9d16e015..1e8aec5e 100644 --- a/examples/example2-formatters.html +++ b/examples/example2-formatters.html @@ -69,7 +69,7 @@

View Source:

// the classes are removed and then added during an update, or just added on cell creation function statusFormatter(row, cell, value, columnDef, dataContext) { var rtn = { text: value, removeClasses: 'red orange green' }; - if (value !== null || value !== "") { + if (value !== null && value !== "") { if (value < 33) { rtn.addClasses = "red"; rtn.toolTip = "danger zone";