File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,22 @@ Or add the js script to your html (download from [releases](https://github.com/j
208
208
required: false,
209
209
default: 10,
210
210
},
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
+ },
211
227
/**
212
228
* If loading of table is to be done through ajax, then this object must be set
213
229
*/
@@ -329,6 +345,33 @@ var handleRow = function (event, entry) {
329
345
330
346
Where event in the ` MouseEvent ` and ` entry ` e the complete entry corresponding to the row.
331
347
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
+
332
375
### AJAX Configuration
333
376
334
377
Ajax Object properties:
@@ -488,6 +531,13 @@ If you have a feature request, please add it as an issue or make a pull request.
488
531
489
532
## Changelog
490
533
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
+
491
541
### 1.1.9
492
542
493
543
* Bug fix - Support for IE11 (maybe fixed for IE10 aswell)
You can’t perform that action at this time.
0 commit comments