saved

Usage

class User extends Model {
  static entity = 'users'
  static fields () {
    return {
      userId: this.attr(null),
      published: this.attr(false)
    }
  }
  static saved (model, record) {
      // check value saved
    console.log(model.published)
    // check original data
    console.log(record)
  }
}

Typescript Declarations

export interface AfterHook<M extends Model = Model> {
  (model: M, record?: Element): void
}
const saved: AfterHook = () => {}