Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Hide context menu item

$
0
0

@idekkers wrote:

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles