diff --git a/README.md b/README.md index 7ac6e8f..6526185 100755 --- a/README.md +++ b/README.md @@ -480,7 +480,7 @@ Many of these methods fire an event when the method is called. You can listen fo | Method | Returns | Event Fired | Description | |--------|---------|-------------| ------------| | `.set( [boolean\|int] value)` | `ClayItem` | `change` | Check/uncheck the state of this item. | -| `.get()` | `int` | | 1 if checked, 0 if not checked | +| `.get()` | `boolean` | | `true` if checked, `false` if not. **NOTE** this will be converted to a `1` or `0` when sent to the watch. See [`ClayConfig.getSettings()`](#methods-1) | | `.disable()` | `ClayItem` | `disabled` | Prevents this item from being edited by the user. | | `.enable()` | `ClayItem` | `enabled` | Allows this item to be edited by the user. | | `.hide()` | `ClayItem` | `hide` | Hides the item | @@ -513,7 +513,7 @@ Many of these methods fire an event when the method is called. You can listen fo | Method | Returns | Event Fired | Description | |--------|---------|-------------| ------------| | `.set( [array] value)` | `ClayItem` | `change` | Checks the checkboxes that corresponds to the provided list of values. | -| `.get()` | `Array.` | | Gets an array of strings representing the list of the values of the checked items | +| `.get()` | `Array.` | | Gets an array of strings representing the list of the values of the checked items. **NOTE:** each item in the array will be separated by a zero when sent to the watch. See [`ClayConfig.getSettings()`](#methods-1) | | `.disable()` | `ClayItem` | `disabled` | Prevents this item from being edited by the user. | | `.enable()` | `ClayItem` | `enabled` | Allows this item to be edited by the user. | | `.hide()` | `ClayItem` | `hide` | Hides the item | diff --git a/src/scripts/lib/manipulators.js b/src/scripts/lib/manipulators.js index 9f0000b..a0f0fb8 100755 --- a/src/scripts/lib/manipulators.js +++ b/src/scripts/lib/manipulators.js @@ -61,7 +61,7 @@ module.exports = { }, checked: { get: function() { - return this.$manipulatorTarget.get('checked') ? 1 : 0; + return this.$manipulatorTarget.get('checked'); }, set: function(value) { this.$manipulatorTarget.set('checked', !!value); diff --git a/test/spec/lib/manipulators.js b/test/spec/lib/manipulators.js index 5dff85a..166a91e 100644 --- a/test/spec/lib/manipulators.js +++ b/test/spec/lib/manipulators.js @@ -152,10 +152,10 @@ describe('manipulators', function() { }); describe('checked', function() { - testSetGet('toggle', true, 1); - testSetGet('toggle', 1); - testSetGet('toggle', false, 0); - testSetGet('toggle', 0); + testSetGet('toggle', true); + testSetGet('toggle', 1, true); + testSetGet('toggle', false); + testSetGet('toggle', 0, false); testDisable('toggle'); testEnable('toggle'); testShow('toggle');