Skip to content

Commit

Permalink
[#31420] Inline Edit Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-viget committed Sep 20, 2024
1 parent f4d0039 commit 1326b2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions resources/js/components/Concept/mixins/Term.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export default {
},
async saveTerm(term, termIndex) {
const finalize = (term, termIndex) => {
term.inEdit = false;
if(term.inEdit) {
this.cancelInlineEdit(term, termIndex);
}

if (termIndex > -1) {
this.terms.splice(termIndex, 1, term);
Expand All @@ -73,7 +75,7 @@ export default {

const [error, response] = await termApi.updateTerm(term.id, term);
if (!error) {
finalize(term);
finalize(term, termIndex);
}
},
async createTerm(term) {
Expand Down

0 comments on commit 1326b2e

Please sign in to comment.