Search code examples
extjsgridstoreextjs6

How to set a record Dirty ExtJs 6


I want to set a whole record from a store to dirty. I have already tried record.setDirty() but this method is deprecated.


Solution

  • ExtJS Record#Set

    The second argument to set accepts an "options" object, where you can specify dirty: true | false

    record.set({ name: 'value', age: 42}, {
      dirty: true
    });
    
    record.set({}, {
      dirty: true
    });