Hello,
I have a ScrollingTable, I am able to scroll down and up but, when I click at the down scroll and then I click at the up scroll until the scroll bar dissapear.
Before:
After:
var inputFieldTable = [
{ ID: "001", Name: "Input 1", Text: "Err1" },
{ ID: "002", Name: "Input 2", Text: "Err2" },
{ ID: "003", Name: "Input 3", Text: "Err3" },
{ ID: "004", Name: "Input 4", Text: "Err4" },
{ ID: "005", Name: "Input 5", Text: "Err5" },
{ ID: "006", Name: "Input 6", Text: "Err6" }
];
myDiagram = $(go.Diagram, "myDiagramDiv", {
initialContentAlignment: go.Spot.Center,
"undoManager.isEnabled": true,
allowMove: false,
allowDelete: true,
allowCopy: false,
allowDragOut: false,
allowDrop: false
});
var detailtemplate = $(
go.Node,
"Vertical",
{
selectionObjectName: "SCROLLING",
resizable: false,
resizeObjectName: "SCROLLING",
portSpreading: go.Node.SpreadingNone
},
new go.Binding("location").makeTwoWay(),
$(go.TextBlock, { font: "bold 14px sans-serif" }, new go.Binding("text", "key")),
$(
go.Panel,
"Auto",
$(go.Shape, { fill: "white" }),
$(
"ScrollingTable",
{ stretch: go.GraphObject.Fill },
new go.Binding("TABLE.itemArray", "items"),
new go.Binding("TABLE.column", "left", function(left) {
return left ? 2 : 0;
}),
new go.Binding("desiredSize", "size").makeTwoWay(),
{
name: "SCROLLING",
desiredSize: new go.Size(100, 100),
"TABLE.itemTemplate": $(
go.Panel,
"TableRow",
{
defaultStretch: go.GraphObject.Horizontal,
fromSpot: go.Spot.LeftRightSides,
toSpot: go.Spot.LeftRightSides,
fromLinkable: true,
toLinkable: true
},
new go.Binding("portId", "Name"),
$(go.TextBlock, { stroke: "red", column: 1 }, new go.Binding("text", "Name")) //Ici couleur texte rouge
),
"TABLE.defaultSeparatorPadding": new go.Margin(5, 0)
}
)
)
);
var templmap = new go.Map();
templmap.add("data", detailtemplate);
myDiagram.nodeTemplateMap = templmap;
myDiagram.layout = $(go.TreeLayout);
myDiagram.model = $(go.GraphLinksModel, {
linkFromKeyProperty: "fromPort",
linkToKeyProperty: "toPort",
nodeDataArray: [
{
key: "Input",
left: true,
location: new go.Point(0, 0),
size: new go.Size(170, 100),
items: inputFieldTable,
category: "data"
}
]
});
If I add one item to inputFieldTable I don’t have the issue anymore.
Seems like scrolling table need 7 items at least to work properly.
Regards,
Alexia