title: How can I clear this text box?
body: <p>The following mithril code is meant to clear a text box upon pulling a value from it. It doesn't clear the text box (or do anything at all). How can I make it work?</p>
  
  <p>Note that if I change this line:</p>
  
  <pre><code>           this.newItemName("");
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>            this.newItemName("abc");
  </code></pre>
  
  <p>then the text box is updated with a new value. But I want To <em>clear</em> it.</p>
  
  <pre><code>var app = {
      controller: function() {
          this.newItemName = m.prop("");
  
          this.makeNewItem = function(name) {
              if (name) {
                  this.newItemName("");
              }
          }
      },
      view: function(ctrl) {
          return m("div", [ m("span", "new item"),
                         m("input",
                          { type: "text",
                            onchange: m.withAttr("value", ctrl.makeNewItem.bind(ctrl)),
                            value: ctrl.newItemName() })]);
      }
  };
  
  m.module(document.body, app);
  </code></pre>