ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: michaelapospechova on February 06, 2018, 06:18:58 pm

Title: Undo works even historyModel is off
Post by: michaelapospechova on February 06, 2018, 06:18:58 pm
Hi

If i delete content of cell by key delete, undo reverts previous value if I press CTRL+Z even if historyModel is disabled.
Tested on version 3.4.1 here http://jsfiddle.net/eLs8jyq6/ (http://jsfiddle.net/eLs8jyq6/)
Is it bug or wrong configuration?
Title: Re: Undo works even historyModel is off
Post by: paramvir on February 06, 2018, 11:57:23 pm
That seems like a bug with historyModel.on

beforeValidate event can be used for the same:

Code: [Select]
       beforeValidate: function(evt, ui) {
         if (ui.source == 'undo' || ui.source == 'redo') {
           return false;
         }
       }

http://jsfiddle.net/eLs8jyq6/1/