Search code examples
vuejs2bootstrap-table

Bootstrap-Table Vuejs OnExpandRow event integration


My goal is when the onExpandRow event is fired, I'm able to return a vue component. I'm unable to find the row context or even render a component that is returned this way.

I cannot find any documentation about the OnExpandRow event with respect to the Vue integration. If I am understanding it right, once you have rendered the table, it should just be further used like the js/jquery version of it.

example of the row configuration to try something stupid simple

onExpandRow: function (index, row) { return '{{row}}' }, 

Should this indeed be treated as if you were just relying on javascript and the vuejs bootstrap-table integration is only happening at the top level?


Solution

  • You can check out the article on my blog: Formatter Use Vue Component.

    It can be used in detailFormatter, a working example: https://live.bootstrap-table.com/code/wenzhixin/1174.