Add two way binding of checklists

This commit is contained in:
Andrés Manelli 2018-04-18 00:59:22 -03:00
parent b2e175ba8c
commit 49c415f023
4 changed files with 37 additions and 13 deletions

View file

@ -74,8 +74,10 @@ BlazeComponent.extendComponent({
event.preventDefault();
const textarea = this.find('textarea.js-add-checklist-item');
const title = textarea.value.trim();
const cardId = this.currentData().cardId;
let cardId = this.currentData().cardId;
const card = Cards.findOne(cardId);
if (card.isImported())
cardId = card.importedId;
if (title) {
Checklists.insert({