Sha256: 829751f40d83c474a253a84569186bcb36bd25b76f073fe0a146d47d0813e138

Contents?: true

Size: 620 Bytes

Versions: 32

Compression:

Stored size: 620 Bytes

Contents

import { default as EmberObject, computed } from "@ember/object";

export default EmberObject.extend({
  isNew: false,
  value: "",
  valueBuffer: "",
  error: null,
  saving: false,
  count: 0,

  init() {
    this._super(...arguments);
    this.set("valueBuffer", this.get("value"));
  },

  updateValue(newValue) {
    this.setProperties({
      value: newValue,
      valueBuffer: newValue
    });
  },

  hasBuffer: computed("value", "valueBuffer", function() {
    return this.get("value") !== this.get("valueBuffer");
  }),

  zeroCount: computed("count", function() {
    return this.get("count") <= 0;
  })
});

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
logster-2.6.2 client-app/app/models/pattern-item.js
logster-2.6.1 client-app/app/models/pattern-item.js
logster-2.6.0 client-app/app/models/pattern-item.js
logster-2.5.1 client-app/app/models/pattern-item.js
logster-2.5.0 client-app/app/models/pattern-item.js
logster-2.4.2 client-app/app/models/pattern-item.js
logster-2.4.1 client-app/app/models/pattern-item.js
logster-2.4.0 client-app/app/models/pattern-item.js
logster-2.3.3 client-app/app/models/pattern-item.js
logster-2.3.2 client-app/app/models/pattern-item.js
logster-2.3.1 client-app/app/models/pattern-item.js
logster-2.3.0 client-app/app/models/pattern-item.js