2019-10-23 12:30:52 -04:00
|
|
|
import Component from "@ember/component";
|
|
|
|
export default Component.extend({
|
2018-12-17 09:28:29 -05:00
|
|
|
tagName: "",
|
|
|
|
|
|
|
|
buffer: "",
|
|
|
|
editing: false,
|
|
|
|
|
|
|
|
init() {
|
|
|
|
this._super(...arguments);
|
|
|
|
this.set("editing", false);
|
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
edit() {
|
2019-05-27 04:15:39 -04:00
|
|
|
this.set("buffer", this.value);
|
2018-12-17 09:28:29 -05:00
|
|
|
this.toggleProperty("editing");
|
|
|
|
},
|
|
|
|
|
|
|
|
save() {
|
|
|
|
// Action has to toggle 'editing' property.
|
2019-05-27 04:15:39 -04:00
|
|
|
this.action(this.buffer);
|
2018-12-17 09:28:29 -05:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|