-
9 Feb 2013 4:56 PM #1
[4.2.0.265] Bug with RowEditing in Ext.view.Table.updateColumns
[4.2.0.265] Bug with RowEditing in Ext.view.Table.updateColumns
The bug is very strange so I do my best to describe it.
I have a grid with two combobox editors in the columns.
To add a new row, I use
When I hit update, the request is send to the server but I get a null pointer exception in Ext.view.Table.updateColumns atPHP Code:this.getBenutzerView ().getStore ().insert (0, new User ({
....
}));
grid.getPlugin ('myRowEditingID').startEdit (0, 0);
because oldCell is null. In fact when investigating the DOM tree behind the RowEditing bar, the columns which uses a combobox are missing (no tds) when the exception rises.PHP Code:Ext.fly(oldCell).syncContent(newCell);
I added a check here
and it seems to work fine then. After the RowEditing bar closes the dom is intact again.PHP Code:if (!oldCell || !newCell) continue;
I haven't tested it with older versions.
Cheers,
Jörn
-
9 Feb 2013 10:07 PM #2
Can't reproduce it, please post a proper test case:
Code:Ext.define('Thing', { extend: 'Ext.data.Model', fields: ['name'] }); Ext.require('*'); Ext.onReady(function(){ var rowEditing = new Ext.grid.plugin.RowEditing(); var store = new Ext.data.Store({ model: Thing, data: [] }); var grid = new Ext.grid.Panel({ renderTo: document.body, width: 400, height: 200, store: store, columns: [{ dataIndex: 'name', flex: 1, text: 'Name', field: { xtype: 'textfield' } }], plugins: [rowEditing] }); setTimeout(function(){ store.add({ name: 'Thing 1' }); rowEditing.startEdit (0, 0); }, 500); });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
10 Feb 2013 3:18 AM #3
Seems to be related to http://www.sencha.com/forum/showthre...ataIndex-usage
Using one column with one dataIndex seems to "fix" this.
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote