Currently, I am referencing the reverseKey documentation available at enter link description here
Below is the code in question:
<div class="one-table-row row-with-data row" v-for="message in messages | orderBy orderKey reverse |filterBy searchKey | offset offset | limit perpage">
// ...... other code
</div>
This is how I have set up my ViewModel:
data: function(){
return {
// other vars....
reverse: false
}
}
The issue I am encountering is that the list of message
s is not being reversed as expected.
However, if I replace the code with this:
<div class="one-table-row row-with-data row" v-for="message in messages | orderBy orderKey -1|filterBy searchKey | offset offset | limit perpage">
// ...... other code
</div>
Despite keeping the ViewModel the same, this new version works properly.
So, the question remains: why does using reverse
(whether as false or -1) doesn't work as intended compared to directly using -1 inline (as per the documentation link provided)?