src/js/painter/controller.js
function(address, shouldBlur, value) {
        var focusModel = this.focusModel;
        var row, currentValue;

        if (!focusModel.isEditingCell(address.rowKey, address.columnName)) {
            return false;
        }

        this.selectionModel.enable();

        if (!_.isUndefined(value)) {
            row = this.dataModel.get(address.rowKey);
            currentValue = row.get(address.columnName);

            if (!(util.isBlank(value) && util.isBlank(currentValue))) {
                this.setValue(address, this._checkMaxLength(address.columnName, value));
            }
        }
        focusModel.finishEditing();

        if (shouldBlur) {
            focusModel.focusClipboard();
        } else {
            _.defer(function() {
                focusModel.refreshState();
            });
        }

        return true;
    }
function(address, shouldBlur, value) {
        var focusModel = this.focusModel;
        var row, currentValue;

        if (!focusModel.isEditingCell(address.rowKey, address.columnName)) {
            return false;
        }

        this.selectionModel.enable();

        if (!_.isUndefined(value)) {
            row = this.dataModel.get(address.rowKey);
            currentValue = row.get(address.columnName);

            if (!(util.isBlank(value) && util.isBlank(currentValue))) {
                this.setValue(address, this._checkMaxLength(address.columnName, value));
            }
        }
        focusModel.finishEditing();

        if (shouldBlur) {
            focusModel.focusClipboard();
        } else {
            _.defer(function() {
                focusModel.refreshState();
            });
        }

        return true;
    }
function ( address , shouldBlur , value ) { var focusModel = this . focusModel ; var row , currentValue ; if ( ! focusModel . isEditingCell ( address . rowKey , address . columnName ) ) { return false ; } this . selectionModel . enable ( ) ; if ( ! _ . isUndefined ( value ) ) { row = this . dataModel . get ( address . rowKey ) ; currentValue = row . get ( address . columnName ) ; if ( ! ( util . isBlank ( value ) && util . isBlank ( currentValue ) ) ) { this . setValue ( address , this . _checkMaxLength ( address . columnName , value ) ) ; } } focusModel . finishEditing ( ) ; if ( shouldBlur ) { focusModel . focusClipboard ( ) ; } else { _ . defer ( function ( ) { focusModel . refreshState ( ) ; } ) ; } return true ; }
Ends editing a cell identified by a given address, and returns the result.
@param {{rowKey:String, columnName:String}} address - cell address
@param {Boolean} shouldBlur - if set to true, make the current input lose focus.
@param {String} [value] - if exists, set the value of the data model to this value.
@returns {Boolean} - true if succeeded, false otherwise
Ends editing a cell identified by a given address and returns the result .