Extjs 5 grid sync row render issues -
using extjs 5.1.0 issues, when add value store of grid , call store.sync() inserted row become selected (visually) cannot select edit or darg&drop row sorting, helps reload grid.
here store:
var store = ext.create('ext.data.arraystore', { model: 'pbxe.module.conference.conferencemodel', proxy: { type: 'direct', api: { read: pbxe._conference.read, create: pbxe._conference.create, update: pbxe._conference.update, destroy: pbxe._conference.destroy, }, reader: { rootproperty: 'data', totalproperty: 'totalcount', successproperty: 'success', messageproperty: 'message' }, writer: { writeallfields: true, }, }, autosync: false, autoload: true, });
we ran same problem, seems there issue of selection model keeping map of records added store can't "deselected".
so bit of brute force:
// workaround grid / selection model problem // after adding multiple new records store.sync() //var grid = grid bound store... mystore.sync( { scope: this, success: function (batch, options) { var sm = grid.getselectionmodel(); var records = batch.operations[0].getrecords(); if (sm && sm.selected) { // deselect not work has bug leaves new records in map sm.selected.map = {}; //wipe clear selected records map } sm.select(records); } });
hope helps - works in ext js 5.1.0
Comments
Post a Comment