Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
itchief committed Jul 24, 2021
1 parent 9f32428 commit d2c7f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simple-todo-list/simple-todo-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const todo = {
elemText.value = '';
},
create(text) {
return `<li class="todo__item" data-todo-state="active" draggable="true">
return `<li class="todo__item" data-todo-state="active">
<span class="todo__task">${text}</span>
<span class="todo__action todo__action_restore" data-todo-action="active"></span>
<span class="todo__action todo__action_complete" data-todo-action="completed"></span>
Expand All @@ -40,8 +40,8 @@ const todo = {
},
update() {
const option = document.querySelector('.todo__options').value;
document.querySelector('.todo__text').disabled = option !== 'active';
document.querySelector('.todo__items').dataset.todoOption = option;
document.querySelector('.todo__text').disabled = option !== 'active';
},
save() {
localStorage.setItem('todo', document.querySelector('.todo__items').innerHTML);
Expand Down

0 comments on commit d2c7f74

Please sign in to comment.