Commit 446c51ff authored by esatakpunar's avatar esatakpunar

search event changed state

parent da371342
......@@ -7,7 +7,6 @@ export default {
return {
selected: [],
column: "all",
search: "",
};
},
computed: {
......@@ -24,6 +23,8 @@ export default {
"editedIndex",
"getOptions",
"totalProducts",
"getSearch",
"filterColumn",
]),
indexofColumn() {
......@@ -58,6 +59,15 @@ export default {
this.setSingleExpand(data);
},
},
search: {
get() {
return this.getSearch;
},
set(data) {
this.setSearch(data);
},
},
},
methods: {
...mapActions("products", [
......@@ -70,6 +80,7 @@ export default {
"setExpanded",
"setSingleExpand",
"setOptions",
"setSearch",
]),
},
created() {
......@@ -122,9 +133,11 @@ export default {
<v-btn
icon
large
color="blue-grey"
color="blue"
class="white--text"
@click="fetchProductData"
@click="
fetchProductData({ searchInput: search, filterColumn: column })
"
>
<v-icon>refresh</v-icon>
</v-btn>
......@@ -167,7 +180,15 @@ export default {
<v-btn color="blue darken-1" @click="closeDialog()"
>Cancel</v-btn
>
<v-btn color="blue darken-1" @click="saveProduct()">
<v-btn
color="blue darken-1"
@click="
saveProduct({
searchInput: search,
filterColumn: column,
})
"
>
Save</v-btn
>
</template>
......
......@@ -30,4 +30,7 @@ export default {
setTotalProducts(state, data) {
state.totalProducts = data;
},
setSearch(state, data) {
state.search = data;
},
};
......@@ -7,6 +7,7 @@ export default () => ({
editedItem: {},
dialog: false,
loading: false,
options: {},
options: { sortDesc: [false] },
totalProducts: 0,
search: "",
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment