<p dir="auto">Hi,</p>
<p dir="auto">There was a hot discussion in the Gitter chat and there is <a href="http://forum.vuejs.org/topic/3896/i-m-going-to-miss-filters-in-vue-2-0" rel="nofollow">a nice post on the forum</a> about people missing the <code class="notranslate">filter</code> feature in 2.0 and it actually being a no-go to upgrading for some. This isn't a positive direction for the community it seems.</p>
<p dir="auto">So, I'd like to put up this suggestion to bring back filters in 2.0, because they are so loved and, I would agree, smart. Here are some of the arguments for filters (gathered from the different discussions and no guarantee for correctness):</p>
<ul dir="auto">
<li>They are easier to read in the templates</li>
</ul>
<p dir="auto"><code class="notranslate">thing in things | filterBy 'foo' | orderBy 'bar' | limitBy 5</code></p>
<p dir="auto">is simply easy to read. In other words, chaining filters helps make sense of what should actually be expected.</p>
<ul dir="auto">
<li>Filters are global, which is great in a templating/ view system. Currency is a simple example of a great filter that can be used everywhere, just by calling it.</li>
<li>Without filters, there will be a ton of boilerplate.</li>
<li>Filters allow noobs to learn faster and get a quick and nice winning experience with Vue.</li>
<li>Using a mixin for every component to include a self-made "filter" isn't really feasible.</li>
</ul>
<p dir="auto">Needless to say, there are probably strong arguments for removing filter from an engineering perspective and why I would suggest this thread be a pros and cons and voting for or against the return of filters.</p>
<p dir="auto">Scott</p>
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.17</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://jsfiddle.net/4n9jcgxL/" rel="nofollow">https://jsfiddle.net/4n9jcgxL/</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Change the text in the "normal" input. <code class="notranslate">value</code> bindings update as expected.</p>
<p dir="auto">Change the text in the "component" input. <code class="notranslate">value</code> bindings still update as expected.</p>
<p dir="auto">Change the text in the "normal" input again. The "component" input does not update. However, its <code class="notranslate">value="..."</code> attribute appears to be correct.</p>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">The <code class="notranslate">&lt;component is="input" :value="value"&gt;</code> should update when <code class="notranslate">value</code> changes.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">It looks like after editing a <code class="notranslate">&lt;component is="input"&gt;</code> the value property and the value attribute get out of sync, which stops the UI from updating.</p>
<p dir="auto">(My use case actually looks something like <code class="notranslate">&lt;component :is="multiline ? 'textarea' : 'input'"&gt;&lt;/component&gt;</code>, for what it's worth.)</p>