Browse Source

fix(examples/todo): don't submit empty values (#10979)

main
Pooya Parsa 7 years ago
committed by Brian Vaughn
parent
commit
e355e348b2
  1. 3
      _js/examples/todo.js

3
_js/examples/todo.js

@ -26,6 +26,9 @@ class TodoApp extends React.Component {
handleSubmit(e) {
e.preventDefault();
if (!this.state.text.length) {
return;
}
var newItem = {
text: this.state.text,
id: Date.now()

Loading…
Cancel
Save