From bcc2b87e6ef91c68ac332ff88bdb183ddc6fd6eb Mon Sep 17 00:00:00 2001 From: Fredrick W Warren Date: Wed, 10 Feb 2021 12:33:21 -0800 Subject: [PATCH] 11.5 Setup an Action & Mutation to set the search property --- src/components/Tasks/Tools/Search.vue | 10 +++++++--- src/store/store-tasks.js | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/Tasks/Tools/Search.vue b/src/components/Tasks/Tools/Search.vue index 64acb6b..f1eb704 100644 --- a/src/components/Tasks/Tools/Search.vue +++ b/src/components/Tasks/Tools/Search.vue @@ -16,7 +16,7 @@ diff --git a/src/store/store-tasks.js b/src/store/store-tasks.js index cd617bf..4541b44 100644 --- a/src/store/store-tasks.js +++ b/src/store/store-tasks.js @@ -36,6 +36,9 @@ const mutations = { }, addTask (state, payload) { Vue.set(state.tasks, payload.id, payload.task) + }, + setSearch (state, value) { + state.search = value } } @@ -53,6 +56,9 @@ const actions = { task: task } commit('addTask', payload) + }, + setSearch ({ commit }, value) { + commit('setSearch', value) } }