summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--slick.editors.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/slick.editors.js b/slick.editors.js
index 0454450..f3ef8e9 100644
--- a/slick.editors.js
+++ b/slick.editors.js
@@ -302,7 +302,7 @@
};
this.loadValue = function (item) {
- defaultValue = item[args.column.field];
+ defaultValue = !!item[args.column.field];
if (defaultValue) {
$select.attr("checked", "checked");
} else {
@@ -311,7 +311,7 @@
};
this.serializeValue = function () {
- return $select.attr("checked");
+ return !!$select.attr("checked");
};
this.applyValue = function (item, state) {
@@ -319,7 +319,7 @@
};
this.isValueChanged = function () {
- return ($select.attr("checked") != defaultValue);
+ return (this.serializeValue() !== defaultValue);
};
this.validate = function () {