I would like to use Grid JS with a HTML table that is already rendered. I would also like to utilize the RowSelection Plugin. How can I do both.
Here is the code I would like to execute.
const grid = new Grid({
sort: true,
from: this.tableTarget,
columns:[
{
id: 'selectRow',
name: html( '<input type="checkbox" name="custom_toggle" class="mx-auto w-100" data-action="click->web--tenant--grid#toggleSelectAll" />' ),
width: "95px",
sort: false,
plugin: {
component: RowSelection,
}
}
],
resizable: true,
className: {
table: 'table table-striped'
},
style: {
table: {"white-space": "nowrap"},
},
autoWidth: true
})