title: condition check to see which method to use in vue input
body: <p>Currently learning <code>vue</code> by making a todo list.</p>
  <p>I wanted to be able to edit the todo items, so I added a button for edit. and upon edit the input will be a text type and edit's text will be save.</p>
  <p>I got them working but final part where save (same button as edit) is clicked.
  I tried using something like</p>
  <pre><code>  &lt;button
      class=&quot;btn btn-sm&quot;
      :class=&quot;editable ? 'btn-outline-success' : 'btn-outline-info'&quot;
      @click.prevent=&quot;editable ? onSave : onEdit&quot;&gt;{{ editable ? 'save' : 'edit' }}
    &lt;/button&gt;
  </code></pre>
  <p>This actually disabled the button somehow that when I click the button the <code>onEdit</code> method does not even happen at all.</p>
  <p>Am I doing it wrong or this is just not possible?</p>
  <p>Thanks in advance for any suggestions and advices</p>