-
Notifications
You must be signed in to change notification settings - Fork 39
Public Methods
Only available from 1.1.11
-
refresh
: perform a refresh on the table -
setPageSize
: changes the page size being used
On the HTML page, when defining the table, assign a ref name to it. Like so:
<vue-bootstrap-table
ref="exampleTable"
:columns="columns"
[...]
>
</vue-bootstrap-table>
So, in the previous example, this table reference is exampleTable
new Vue({
el: '#app',
components: {
VueBootstrapTable,
},
data: {
[..........]
},
methods: {
refreshTable: function(){
this.$refs.exampleTable.refresh();
},
setNewPageSize:function(){
this.$refs.exampleTable.setPageSize(1);
},
},
});
The refresh
method refreshes the state of the table.
When used with ajax and delegate forces the table to fetch data, with the present filter configurations and selected page, and page size.
The setPageSize
takes an integer as input parameter.
This method changes the provided value of pagesize given on instantiation to this new value, forcing the table to refresh.
When used with ajax and delegate forces the table to fetch data again, with the present filter configurations and selected page, and page size.
This method, when used with ajax and delegate requires that the server side returns the correct number of elements to display.