diff --git a/src/views/List.vue b/src/views/List.vue
index 136f9f0..ebd9657 100644
--- a/src/views/List.vue
+++ b/src/views/List.vue
@@ -26,7 +26,7 @@
+
+
+
@@ -56,6 +59,8 @@ export default {
listName: '',
searchQ: '',
searchResults: [],
+ uncheckedItems: [],
+ checkedItems: [],
initialItems: [],
loading: true,
addModalShown: false,
@@ -114,23 +119,20 @@ export default {
})
},
recopyItemsObject: function () {
- this.searchResults = this.initialItems.map(x => ({...x}));
+ this.uncheckedItems = this.initialItems.filter(x => !x.checked).map(x => ({...x}));
+ this.checkedItems = this.initialItems.filter(x => x.checked).map(x => ({...x}));
},
searchItem: function (e) {
if (e.key === 'Enter') {
this.createItem();
} else {
if (this.searchQ.length > 0) {
- this.searchResults = this.searchResults.filter(i => i.content.toLowerCase().indexOf(this.searchQ.toLowerCase()) >= 0)
+ this.searchResults = this.initialItems.filter(i => i.content.toLowerCase().indexOf(this.searchQ.toLowerCase()) >= 0)
} else {
this.recopyItemsObject();
}
}
},
- addItem: function (item) {
- this.initialItems.push(item);
- this.recopyItemsObject();
- },
onChange: function (event) {
if (event.moved) {
this.updateItem({