[Vuejs]-Vue data table sort doesn't work correctly

0👍

Actually, I should pay attention to value property in headers. As you can see, in HTML I have, for example, props.item.currency, but in headers {text: 'Currency', value: 'curr', align: 'center', class: 'px-0', sortable: false}. So, I just change curr value to currency, just like object’s properties name. I did it for every property and now it works.

0👍

sort-by and sort-order fields are String and Boolean respectively. They are Arrays only if multi-sort is true.

If multi-sort is disabled: Try sort-by="quan" instead of :sort-by="['quan']".

If multi-sort is enabled: Try :sort-desc=[true] instead of :sort-desc="true".

Leave a comment