<commit_before>import Ember from 'ember';

export default Ember.Component.extend({
    tagName: 'span',
    actions: {
        startEdit: function () {
            if (!this.get("enabled")) {
                return;
            }

            this.set('value', this.get('show'));
            this.set('editing', true);
        },
        saveEdit: function () {
            this.set('show', this.get('value'));
            this.get('content').save();
            this.set('editing', false);<commit_msg>Workaround saving computed.indirect when used in click to edit components<commit_after>import Ember from 'ember';

export default Ember.Component.extend({
    tagName: 'span',
    actions: {
        startEdit: function () {
            if (!this.get("enabled")) {
                return;
            }

            this.set('value', this.get('show'));
            this.set('editing', true);
        },
        saveEdit: function () {
            this.set('show', this.get('value'));
            this.set(this.get('field'), this.get('value')); // workaround for https://github.com/gordonkristan/ember-computed-indirect/issues/10
            console.log("Edit save: ", this.get('value'), " -> ", this.get('field'), " = ", this.get(this.get('field')), ' = ', this.get('show'));
            this.get('content').save();
            this.set('editing', false);
{'fraction_non_alphanumeric': 0.17920353982300885, 'fraction_numerical': 0.0014749262536873156, 'mean_word_length': 2.1267281105990783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2769252', 'n_tokens_mistral': 384, 'n_tokens_neox': 377, 'n_words': 71}