datatableMasterMcu.bootstrapTable({ url: "/dashboard/datatable/mcu", showColumns: true, showColumnsToggleAll: true, showRefresh: true, sortable: true, search: true, searchOnEnterKey: false, searchHighlight: true, pagination: true, serverSide: true, pageSize: 10, pageList: [10, 20, 30, 40, 50, 100, 200], cookie: true, icons: { refresh: "fas fa-sync-alt", // atau ganti ke icon lain columns: "fas fa-th-large" }, columns: [ { title: "Action", field: 'menu_mcu_id', formatter: function(value, row) { let buttons = '' buttons += ` ` console.log(row); buttons += ` ` return `
${buttons}
`; }, width: 120 }, { title:"Nama MCU", field:"nama_mcu", width: 300 }, { title:"Harga", field:"menu_mcu_id", formatter: function(value, row) { return `${row?.harga ? ` Rp ${parseInt(row.harga).toLocaleString('id-ID')}` : ``}` }, width: 200 }, ] });