I am using the vaadin-grid webcomponent in an app where I have 3 nested grids, A has B in row-details, and B has C in row-details as seen below. The problem I am having is that the height of the row-detail seems to be exactly enough for the number of rows in the nested table, but not the header row, thus a scrollbar is inserted. I haven’t been able to see how to fix this. Any suggestions?
I will admit that it’s an older version of the component since we are currently stuck in an older version of Polymer, though hope to be upgrading by early next year. In the meantime I’m trying to make this work.
.grid {
height: auto;
display: flex;
flex: 1;
white-space: normal;
--vaadin-grid-header-cell: {
white-space: normal;
}
--vaadin-grid-body-cell: {
white-space: nowrap;
}
--vaadin-grid-body-row-selected-cell: {
background-color: #2fbfd;
}
}
<vaadin-grid id="files" class="grid" items="[[_fileData]
]" size="[[_fileData.length]
]" class="grid" on-active-item-changed="_selectFile">
<template class="row-details">
<vaadin-grid id="[[_getFcnTableId(item.id)]
]" class="grid" items="[[_getFcnItems(item.id)]
]"
on-active-item-changed="_selectFunction">
<template class="row-details">
<vaadin-grid id="[[_getLnnoTableId(item.fileId,item.id)]
]" class="grid"
items="[[_getLnnoItems(item.fileId,item.id)]
]"
on-active-item-changed="_updateCCSWindowsWithLine">
<vaadin-grid-column resizable>
<template class="header">Line No</template>
<template>[[item.line]
]</template>
</vaadin-grid-column>
<vaadin-grid-column resizable>
<template class="header">Start Address</template>
<template>[[item.addr]
]</template>
</vaadin-grid-column>
...
</vaadin-grid>
</template>
<vaadin-grid-column hidden>
<template class="header">ID</template>
<template>[[item.fileId]
]</template>
</vaadin-grid-column>
<vaadin-grid-column resizable>
<template class="header">Function Name</template>
<template>[[item.name]
]</template>
</vaadin-grid-column>
...
</vaadin-grid>
</template>
<vaadin-grid-column hidden>
<template class="header">ID</template>
<template>[[item.id]
]</template>
</vaadin-grid-column>
<vaadin-grid-column resizable>
<template class="header">File name</template>
<template>[[item.name]
]</template>
</vaadin-grid-column>
...
</vaadin-grid>