Skip to content

Public Methods

Rui Pereira edited this page Jul 19, 2018 · 2 revisions

Only available from 1.1.11

What Methods exist?

How to use them:

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);
        },
    },
});

Method Descriptions

refresh

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.

setPageSize( int )

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.

Clone this wiki locally