Skip to content

Commit

Permalink
Add component:clone event. Closes #739
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jan 10, 2018
1 parent cbd2cc7 commit a69d70c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ module.exports = () => {

var collection = sel.collection;
var index = collection.indexOf(sel);
collection.add(sel.clone(), {at: index + 1});
sel.emitUpdate()
const added = collection.add(sel.clone(), {at: index + 1});
sel.emitUpdate();
ed.trigger('component:clone', added);
},
};

Expand Down

0 comments on commit a69d70c

Please sign in to comment.