buefy
buefy copied to clipboard
Method of b-table to sort simply
Description
A method of b-table which sorts with argument like "default-sort" property (e.g. ['first_name', 'desc']). Not "initSort", because I do not want to sort initially.
Why Buefy need this feature
"initSort" needs "default-sort" property. This means the table will be sorted initially with "default-sort" value. The new sort method bring us programmatic sorting freely.
You can use sort method but it needs a ref of table column
@jtommy Thanks. like this?
this.$refs.somecolumn.sort('desc');
No you have to se a ref to table and to a table column. Then this.$refs.table.sort(this.$refs.mycolumn)
or get the column by this.$refs.table.newColumns
@jtommy All right. Thanks a lot!
I am closing this PR Because a "workaround" was found.