Hi, Am have implemented this https://preview.keenthemes.com/metronic8/demo3/apps/user-management/users/list.html and was able to make the listing dynamic, but encountered a problem with the Action menu, it does not popup when clicked.
after setting the DataTable added KTMenu.createInstances(); on the on("draw"
$(o).DataTable({
info: !1,
order: [],
searchDelay: 500,
processing: true,
serverSide: true,
pagination:true,
stateSave: true,
type:'remote',
ajax:{url: '/select/'+_data, data: {_token: _token}, method: 'post'},
columns:[
{data:'name'},
{data:'role'},
{data:'branch'},
{data:'last_login'},
{data:null}
],
pageLength: 10,
lengthChange: !1,
columnDefs: [
{targets: 0,
className: 'd-flex align-items-center'},
{targets: -3,
data: null,
orderable: false,
className: 'text-end',
render: function (data, type, row) {
return `
Actions
`;
},
}]
})).on("draw", (function () {
l(), KTMenu.createInstances();
})),
Hi,
You will need to reinitialize the KT components when you deal with dynamically populated elements. You can refer to the Bootstrap KTMenu component API documentation here.
Regards.
data-kt-menu-trigger when clicked does not open the menu? do i need to reinitialise the menu?