ドキュメントはこちら
< コード例 >
rowContextMenu: function (component, row) {
//component - column/cell/row component that triggered the menu
//e - click event object <=== eventではなくrow
console.log("--- component")
console.log(component)
console.log("--- e")
console.log(row.getData().iata_code)
//console.log(e.Target._row.data)
const icao = row.getData().icao_code
const iata = row.getData().iata_code
const name = row.getData().name
const icon = `Img/airline/airline_${iata.toLowerCase()}_square.png`
let menu = [];
let itm = {
label: "<span class='mr-1'>" + "<img src='" + icon + "' width='20'/></span>" + icao + " Show LiveMap",
action: function (e, column) {
// -C モーダルダイアログで表示 //
const lm = new LiveMap("#modal_livemap", "livemap-container")
lm.setAirportLatLon(-500, -500)
lm.setUserGroup(userGroup)
lm.setUserId(userId)
lm.showDialog(icao, iata, name)
}
}
menu.push(itm)
return menu;
}
< 画面例 >