Y.DataTable.EditorOptions.textarea Class
Popup Cell Editor "textarea"
This View configuration is used to setup an editor referenced as "textarea" as a popup-type cell editor.
Basic Usage:
// Column definition
{ key:'experience', editor:"textarea"}
// Column definition ... disabling inputKeys navigation and setting offsetXY
{ key:'firstName',
editor:"JobDescription", editorConfig:{
// disables the buttons below the TEXTAREA
overlayConfig:{ buttons: null }
}
}
Standard Configuration
This editor creates a simple TEXTAREA internally within the popup Editor View container positioned directly over the TD element.
The configuration {Object} for this cell editor View is predefined as;
Y.DataTable.EditorOptions.textarea = {
BaseViewClass: Y.DataTable.BaseCellPopupEditor,
name: 'textarea',
// Template.Micro setup
templateObject:{
html: '<textarea title="inline cell editor" class="<%= this.classInput %>"></textarea>'
},
// allow inter-cell navigation
inputKeys: true,
// don't save editor when KEY RTN is detected (must use Save button to save)
saveKeyRTN: false,
// setup two buttons "Save" and "Cancel" for the containing overlay
overlayConfig:{
buttons: [
{ name:'save', value: 'Save',
action:function(){
var val = (this._inputNode) ? this._inputNode.get('value') : null;
this.saveEditor(val);
}
},
{ name:'cancel', value: 'Cancel',
action:function(){
this.cancelEditor();
}
}
]
},
after:{
// focus the TEXTAREA on display
editorShow : function(o){
o.inputNode.focus();
}
}
};
PLEASE NOTE: All other attributes from the BaseViewClass
apply and can be included within the
editorConfig
object.