title: How to animate the sorting of a list with Vue.js
body: <p>I’m trying to animate the sorting of a list with Vue.js, but not all items are animated. Do you know why? And how to make it work?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: '#app',
    data: {
      reverse: 1,
      items: [
        { name: 'Foo' },
        { name: 'Bar' },
        { name: 'Baz' },
        { name: 'Qux' }
      ]
    }
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.moving-item {
    transition: all 1s ease;
    -webkit-transition: all 1s ease;
  }
  ul {
    list-style-type: none;
    padding: 0;
    position: relative;
  }
  li {
    position: absolute;
    border: 1px solid #42b983;
    height: 20px;
    width: 150px;
    padding: 5px;
    margin-bottom: 5px;
    color: #42b983;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.0-alpha.2/vue.min.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
    &lt;button on-click="reverse = Math.abs(reverse-1)"&gt;
      &lt;span v-if="reverse == 0"&gt;△&lt;/span&gt;
      &lt;span v-if="reverse == 1"&gt;▽&lt;/span&gt; Order
    &lt;/button&gt;
    &lt;ul&gt;
      &lt;li class="moving-item" v-for="item in items | orderBy 'name' reverse" bind-style="{ top: ($index * 35) + 'px'}"&gt;{{ item.name }}&lt;/li&gt;
    &lt;/ul&gt;  
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>