rubanraj54 / vue-bootstrap4-table

Advanced table based on Vue 2 and Bootstrap 4 ⚡️
MIT License
220 stars 58 forks source link

2 or more instances of tables on the same vue page? #31

Closed grafxflow closed 5 years ago

grafxflow commented 5 years ago

Is it possible to have 2 or more table instances on the same vue page?

rubanraj54 commented 5 years ago

Why not? It is possible.

But keep in mind that, You should have different config, rows and columns data for each table if all the tables look different.

If all table looks same, but only the data is different, you can reuse the config and columns data. (But I always use different config & columns data for different tables eventhough all tables looks same - for easier debugging).

https://codepen.io/rubanraj54/pen/KErNrG In the above codepen example, you can see I am using two different datasets but reusing the same config & columns data for two tables.

Cheers, Ruby.

grafxflow commented 5 years ago

Perfect works a charm. 👍