update({ data }) {
      const { guid, data: { completed } } = data
      const li = document.querySelector('li[data-guid="' + guid + '"]')
      li.className = completed ? 'completed' : ''
      while (li.firstChild) {
        li.removeChild(li.firstChild)
      }
      const todo = getTodoItemDom(data, false)
      li.appendChild(todo)
      const items = Array.from(document.querySelectorAll('.todo-list li'))
      items.forEach(function (item) {
        item.classList.remove('editing')
      })
    }
// Triggered when an item is updated
Triggered when an item is updated
Triggered when an item is updated
update({ data }) {
      const { guid, data: { completed } } = data
      const li = document.querySelector('li[data-guid="' + guid + '"]')
      li.className = completed ? 'completed' : ''
      while (li.firstChild) {
        li.removeChild(li.firstChild)
      }
      const todo = getTodoItemDom(data, false)
      li.appendChild(todo)
      const items = Array.from(document.querySelectorAll('.todo-list li'))
      items.forEach(function (item) {
        item.classList.remove('editing')
      })
    }
update ( { data } ) { const { guid , data : { completed } } = data const li = document . querySelector ( 'li[data-guid="' + guid + '"]' ) li . className = completed ? 'completed' : '' while ( li . firstChild ) { li . removeChild ( li . firstChild ) } const todo = getTodoItemDom ( data , false ) li . appendChild ( todo ) const items = Array . from ( document . querySelectorAll ( '.todo-list li' ) ) items . forEach ( function ( item ) { item . classList . remove ( 'editing' ) } ) }
Triggered when an item is updated
Triggered when an item is updated