This issue duplicates another issue.
  1. #1
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goias, Goiânia
    Posts
    436
    Vote Rating
    6
    wemerson.januario is on a distinguished road

      0  

    Default [4.2.x]

    [4.2.x]


    REQUIRED INFORMATION
    Ext version tested:
    • Ext 4.2.1 beta
    Browser versions tested against
    • IE8
    • FF20.01
    • Chrome 26
    DOCTYPE tested against:
    • HTML5
    Description:
    • If your grid keeps selection after reload then list of records obtained by grid.getSelectionModel().getSelection() contains the same records before and after reload, so if some selected records have been changed you'll never find it until deselect and then selecte records again.
    Steps to reproduce the problem:
    • Select a record in grid, change some field in the same record, after update reload store and them console.log in the selection record. the selected record is still the old one, You need to unselect and select again to see changes made
    • bar
    The result that was expected:
    • the selected recors keep unchanged
    The result that occurs instead:
    • When you update some field in record, the selection reference needs to be also updated
    Test Case:
    Code:
        Ext.onReady(function() {
        Ext.define('User', {        extend: 'Ext.data.Model',        idProperty: 'id',                fields: [            { name: 'id', type: 'int' },            { name: 'name', type: 'string' },            { name: 'random', type: 'random' }        ]    });        var data = [        { id: 0, name: 'Foo', random: 0 },        { id: 1, name: 'Bar', random: 0 },    ];        var store = Ext.create('Ext.data.Store', {        model: 'User',        data: data,        proxy: {            type: 'memory',            reader: {                type: 'json',                root: 'users'            }        }    });        Ext.create('Ext.grid.Panel', {        store: store,        columns: [            { header: 'Id', dataIndex: 'id' },            { header: 'Name', dataIndex: 'name' },            { header: 'Random', dataIndex: 'random' }        ],        renderTo: Ext.getBody()    });        store.load();
    });
    HELPFUL INFORMATIONScreenshot or Video:
    • attached
    See this URL for live test case: http://Debugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    • custom css (include details)
    Operating System:
    • ________
    • Windows 7 Pro
    Wemerson Januario
    Twitter:
    @wemersonjanuar
    Skype:
    wemerson.januario
    Email: wemerson.januario@gmail.com
    Fone:
    62 9106-6689
    From: Goiânia, Brazil
    Desenvolvedor ExtJS/ ExtJS Developer

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,856
    Vote Rating
    610
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Looks like the same issue as demonstrated here: http://www.sencha.com/forum/showthread.php?261111
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1