A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/amejiarosario/vue-todo-app/commit/45b4eed44abd9a4cfec3b3977b61fe7031ff6c4e below:

trim input · amejiarosario/vue-todo-app@45b4eed · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+2

-2

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+2

-2

lines changed Original file line number Diff line number Diff line change

@@ -12,7 +12,7 @@ const todoApp = new Vue({

12 12

methods: {

13 13

createTodo(event) {

14 14

const textbox = event.target;

15 -

this.todos.push({ text: textbox.value, isDone: false });

15 +

this.todos.push({ text: textbox.value.trim(), isDone: false });

16 16

textbox.value = '';

17 17

},

18 18

startEditing(todo) {

@@ -21,7 +21,7 @@ const todoApp = new Vue({

21 21

finishEditing(event) {

22 22

if (!this.editing) { return; }

23 23

const textbox = event.target;

24 -

this.editing.text = textbox.value;

24 +

this.editing.text = textbox.value.trim();

25 25

this.editing = null;

26 26

},

27 27

cancelEditing() {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4