You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gristlabs_grist-core/app/client/widgets/CheckBoxEditor.js

25 lines
733 B

var dispose = require('../lib/dispose');
var _ = require('underscore');
var TextEditor = require('./TextEditor');
function CheckBoxEditor(options) {
TextEditor.call(this, options);
}
dispose.makeDisposable(CheckBoxEditor);
_.extend(CheckBoxEditor.prototype, TextEditor.prototype);
// For documentation, see NewBaseEditor.ts
CheckBoxEditor.skipEditor = function(typedVal, cellVal) {
if (typedVal === ' ') {
// This is a special case when user hits <space>. We return the toggled value to save, and by
// this indicate that the editor should not open.
return !cellVal;
}
}
// For documentation, see NewBaseEditor.ts
CheckBoxEditor.supportsReadonly = function() { return false; }
module.exports = CheckBoxEditor;