From a34f1d0a99d257c0a25418cd5cdcf65e74dfd07b Mon Sep 17 00:00:00 2001
From: donal <donalspring@gmail.com>
Date: Fri, 23 Mar 2018 18:00:19 +0100
Subject: [PATCH] WIP - heading for flight commit before i go

---
 src/components/NewTodo.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/components/NewTodo.vue b/src/components/NewTodo.vue
index 3192f6b..da2ad43 100644
--- a/src/components/NewTodo.vue
+++ b/src/components/NewTodo.vue
@@ -8,6 +8,8 @@
     </md-field>
   </template>
 <script>
+import EventBus from "@/services/EventBus"
+
 export default {
   name: "NewTodo",
   props: {
@@ -22,7 +24,11 @@
       newTodoAdded (e) {
           this.newTodo = e.target.value
           console.info('INFO - ', this.newTodo)
-          this.$emit('NEW_TODO_ADDED', { message: this.newTodo })
+          EventBus.$emit('NEWTODOADDED', {
+              completed: false, 
+              msg: this.newTodo,
+              id: Math.floor(1 + (9999 - 1) * Math.random())
+              })
           this.newTodo = ''
       }
   }

--
Gitblit v1.9.3