Skip to content

Commit e157c48

Browse files
author
syshex
committed
#14 - fixed - Added new properties to accomplish this
1 parent e9ae9d1 commit e157c48

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,22 @@ Or add the js script to your html (download from [releases](https://github.com/j
208208
required: false,
209209
default: 10,
210210
},
211+
/**
212+
* Setting default order column. Expected name of the column
213+
*/
214+
defaultOrderColumn: {
215+
type: String,
216+
required: false,
217+
default: null,
218+
},
219+
/**
220+
* Setting default order direction. Boolean: true = ASC , false = DESC
221+
*/
222+
defaultOrderDirection: {
223+
type: Boolean,
224+
required: false,
225+
default: true,
226+
},
211227
/**
212228
* If loading of table is to be done through ajax, then this object must be set
213229
*/
@@ -329,6 +345,33 @@ var handleRow = function (event, entry) {
329345

330346
Where event in the `MouseEvent` and `entry` e the complete entry corresponding to the row.
331347

348+
349+
### DEFAULT Ordering
350+
351+
To setup your default ordering for the table:
352+
353+
````html
354+
355+
<vue-bootstrap-table
356+
[...]
357+
:default-order-column="columnToSortBy"
358+
:default-order-direction=true
359+
>
360+
</vue-bootstrap-table>
361+
````
362+
363+
On your Vue instance :
364+
365+
````javascript
366+
data: {
367+
columnToSortBy: "name",
368+
}
369+
````
370+
371+
This will make the default column order be :
372+
* column: name
373+
* order: ascending
374+
332375
### AJAX Configuration
333376

334377
Ajax Object properties:
@@ -488,6 +531,13 @@ If you have a feature request, please add it as an issue or make a pull request.
488531

489532
## Changelog
490533

534+
### 1.1.10
535+
536+
* Bug fix - Delegate true and false behaviours leading to not loading data
537+
* Bug fix - Ajax redundant fetch when not needed
538+
* Enhancement - #14 - Adding support for default ordering
539+
* Enhancement - Documentation of code
540+
491541
### 1.1.9
492542

493543
* Bug fix - Support for IE11 (maybe fixed for IE10 aswell)

0 commit comments

Comments
 (0)