Results 1 to 4 of 4

Thread: validateedit receive the old value instead of latest

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294

    Default validateedit receive the old value instead of latest

    Using https://fiddle.sencha.com/#fiddle/1gej modify value of one cell, click enter or change of cell, look at the console, you will see the wrong value, validateedit receive the previous value instead of current

  2. #2
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default

    I just checked 6.2.0 and it is fixed there, fwiw. If you need a fix/override for 6.0.x I'd contact support. They may already have an override in hand.
    Don Griffin

    "Use the source, Luke!"

  3. #3
    Sencha User
    Join Date
    Nov 2009
    Posts
    2

    Default

    We have the same problem in 6.0.2. Can you post an override, please?

  4. #4
    Sencha Premium Member matei's Avatar
    Join Date
    Jun 2008
    Location
    Cluj-Napoca
    Posts
    84

    Lightbulb

    if you still use 6.0.2
    you can use this override:

    Code:
    Ext.define('My.overrides.grid.CellEditor', {
        override: 'Ext.grid.CellEditor',
    
        // TODO remove when upgrade to >= 6.2.0
        completeEdit: function(remainVisible) {
            var me = this,
                context = me.context;
    
            if (me.editing) {
                context.value = me.field.value;
                if (me.editingPlugin.validateEdit(context) === false) {
                    if (context.cancel) {
                        context.value = me.originalValue;
                        me.editingPlugin.cancelEdit();
                    }
                    return !!context.cancel;
                }
            }
            // don't call parent as will trigger again the 'validateedit' event
            //me.callParent([remainVisible]);
            Ext.Editor.prototype.completeEdit.apply(me, arguments);
        }
    });

Similar Threads

  1. Replies: 12
    Last Post: 1 May 2015, 8:12 AM
  2. Latest Build 1900 and latest CMD give Mixed Mode Error
    By blomasky in forum Sencha Architect 3.x: Bugs
    Replies: 0
    Last Post: 17 Sep 2014, 5:46 PM
  3. grid validateedit
    By disller in forum Ext: Q&A
    Replies: 2
    Last Post: 20 Jun 2012, 4:39 AM
  4. validateedit
    By cluettr in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 7 Aug 2007, 1:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •