PDA

View Full Version : [4.2] - show hidden column then hide - bug (getEditor is undefined)



lilu1
8 Sep 2013, 11:39 PM
Steps to reproduce:
1) make a grid with at least one hidden column
2) when the grid is rendered and is visible, try to show hidden column and then try to hide that same column and you will get error.

I think that bug rises because column's getEditor method is undefined because onReconfigure method implemented in Ext.grid.plugin.Editing uses in initFieldAccessors method this code as a parameter:


grid.getView().getGridColumns()
which returns only visible grid columns.

More quicker steps to reproduce are:
1) go to ext.grid.plugin.rowEditing documentation
2) find code editor / live preview buttons
3) add ", hidden: true" to Phone column config
4) click on live preview
5) try to show and hide Phone column in any column header

lilu1
9 Sep 2013, 3:30 AM
More faster steps to reproduce bug are:

1) go to row editing plugin doc site : http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.plugin.RowEditing
(http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.plugin.RowEditing)2) find code editor / live preview
3) click on code editor and change "{header: 'Phone', dataIndex: 'phone'}" to "{header: 'Phone', dataIndex: 'phone', hidden: true}"
4) click on live preview
5) in any column header try to show and hide Phone column.

Gary Schlosberg
9 Sep 2013, 9:20 AM
I was able to reproduce this issue using 4.2.1, though not on the first try -- it took some playing. When I tested against the latest nightly, I could not reproduce this -- it worked as expected. I believe it has been fixed, since there was another similar bug filed which more definitely tested clean against the new release:
http://www.sencha.com/forum/showthread.php?271356

heweiquan123
7 Dec 2013, 12:32 AM
i meet the problem,too.4.2.1 onReconfigure: function() { var grid = this.grid; grid = grid.ownerLockable ? grid.ownerLockable : grid; this.initFieldAccessors(grid.getView().getGridColumns());},grid.getView().getGridColumns() dose not Contains a hidden column