Hello, I have an issue with the table panel. When there is a TextBlock inside as a separate row then it adds some extra blank space after the text block. The amount of the extra space depends on how long the text is. How to prevent this space from appearing?
Here’s an example code. The first shape is simulating a simple button. The second row represents a header. And the third row represents content which is expected to fill the remaining space. There should be no extra blank space between rows.
Screenshot:
Code example:
<!DOCTYPE html>
<html lang="en">
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/release/go-debug.js"></script>
<div id="sample">
<div id="myDiagramDiv" style="border: solid 1px black; width: 400px; height: 400px"></div>
</div>
<script id="code">
const myDiagram =
new go.Diagram('myDiagramDiv');
myDiagram.groupTemplate =
new go.Group('Spot', {
desiredSize: new go.Size(100, 200)
})
.add(
new go.Panel('Table', {stretch: go.Stretch.Fill})
.add(new go.Shape({
stroke: "black",
fill: "white",
row: 0,
desiredSize: new go.Size(20, 20)
}))
.add(new go.TextBlock({
text: "Some text Some text Some text",
row: 1,
stretch: go.Stretch.Horizontal
}))
.add(new go.Shape({
stroke: "black",
fill: "white",
row: 2,
stretch: go.Stretch.Fill
}))
);
myDiagram.model = new go.GraphLinksModel(
[
{ key: 1, text: 'Alpha', color: 'lightblue', isGroup: true },
],
[]
);
</script>
</div>
</body>
</html>


