Hi
I have this code:
let x =
$(go.Adornment, “Vertical”, // that has one button
$(“ContextMenuButton”, {name: ‘menuItem’},
$(go.TextBlock, “XXX”),
{ click: function (e, obj) {
let nodeData = obj.part.data;
let param={
state: ‘filter’,
tabindex: 0,
params: {
troubleTicketIds: nodeData.tickets
}
};
that.open_tt2(param);
// openT(sString(param));
} }
),
$(“ContextMenuButton”,
$(go.TextBlock, “YYY”),
{ click: function (e, obj) {
let nodeData = obj.part.data;
openT(sString(nodeData));
} }
)
);
menu item XXX has nodeData.tickets in it,
what is needed is to show the menu item only if the length of nodeData.tickets is grater then 0.
thanks