Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User Fire-Dragon-DoL's Avatar
    Join Date
    Dec 2011
    Posts
    141
    Vote Rating
    1
    Fire-Dragon-DoL is on a distinguished road

      0  

    Default [4.1.0] Row editing plugin doesn't fire "canceledit" when changing row

    [4.1.0] Row editing plugin doesn't fire "canceledit" when changing row


    Referencing this topic for this bug: http://www.sencha.com/forum/showthre...691#post811691

    If autoCancel is set to true, and we move the editor on a different row, the changes are actually canceled but "canceledit" event is not fired.

    I think that if any changes are reverted (in any moment), canceledit should be fired. In this situation should be fired too.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The event is only fired when you press the cancel button.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2014
    Posts
    10
    Vote Rating
    0
    andersonjohnf is on a distinguished road

      0  

    Default


    Not to necro this thread, but why is it considered ok to have an important event (moving row editor to a new record) not fire any event? It gives us no way to handle the very common scenario where we may want to remove the newly added record from the store if they cancel without entering all valid information.

    Edit: This is still an issue in Ext 5 btw

  4. #4
    Sencha User Fire-Dragon-DoL's Avatar
    Join Date
    Dec 2011
    Posts
    141
    Vote Rating
    1
    Fire-Dragon-DoL is on a distinguished road

      0  

    Default


    Quote Originally Posted by andersonjohnf View Post
    Not to necro this thread, but why is it considered ok to have an important event (moving row editor to a new record) not fire any event? It gives us no way to handle the very common scenario where we may want to remove the newly added record from the store if they cancel without entering all valid information.

    Edit: This is still an issue in Ext 5 btw
    I agree with you, I ended dropping Ext, faced various similar issues

  5. #5
    Sencha User
    Join Date
    Aug 2014
    Posts
    10
    Vote Rating
    0
    andersonjohnf is on a distinguished road

      0  

    Default


    Code:
    Ext.define('MyApp.patch.Editing', {
        override: 'Ext.grid.plugin.Editing',
        onCellClick: function(view, cell, colIdx, record, row, rowIdx, e) {
            if (this.editing) return; // kill moveByClick
            
            var expanderSelector = view.expanderSelector,
                columnHeader = view.ownerCt.getColumnManager().getHeaderAtIndex(colIdx),
                editor = columnHeader.getEditor(record);
    
    
            if (this.shouldStartEdit(editor) && (!expanderSelector || !e.getTarget(expanderSelector))) {
                this.startEdit(record, columnHeader);
            }
        }
    });
    I ended up just doing an override that kills move by click in a roweditor when you are currently editing. In our application there isn't a reason for someone to be able to bounce between rows without finishing the one they're on. I'm pretty surprised that this isn't a config option.

    Edit: That override is for ExtJS 5.0.1 btw