javascript - extjs cellediting event passing activecolumn as null -


this happens extjs versions 6.2+. have cellediting plugin has listener event on edit. when onedit called, trying check xtype of edited cell , fails since active columns passed nulls. works fine earlier versions. per research, bug never got fixed in extjs versions , don't see workaround yet. if come across this, please advise.

problem: on cellediting, editor.activecolumn null. works fine earlier versions. looks extjs 6.2 cellediting plugin editor.el.dom passes null.

panel layout :

    hideheaders: false, sortablecolumns: false, rowlines: true, collapsible: false, titlecollapse: true, layout: 'auto', title: 'test page', selmodel: 'cellmodel', plugins: {     ptype: 'cellediting',     clickstoedit: 1,     listeners: {         beforeedit: 'iseditable',         edit: 'onedit'     } } 

above code trigger onedit , below function:

    onedit: function(editor, c, e) {      // combobox check     if (editor.activecolumn.config.editor.xtype === 'combo') {                  console.log("it's combo");     } } 

indeed, starting extjs 6.2 activecolumn property no more available editor object on edit. shouldn't have relied on in first place, it's not documented, , there other means achieve want.

take @ context (second argument) passed edit event listener. among other things, has column property, need. in case, can replace

onedit: function(editor, c, e) {     if (editor.activecolumn.config.editor.xtype === 'combo') {          console.log("it's combo");     } } 

with

onedit: function(editor, context) {     if (context.column.config.editor.xtype === 'combo') {          console.log("it's combo");     } } 

and work across version of extjs 6.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -