You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Grid tooltip generator throws "Cannot destructure property 'gridtooltips' of 'item' as it is undefined" (regression from #9697) #10247
The generator is called when there is no item, in two cases:
<vaadin-tooltip>'s updated() calls __updateContent() → generator(this.context) as soon as generator is assigned. context defaults to {}, so every grid with a tooltip generator throws once when the tooltip element is attached. That happens on first render, or when a hidden grid becomes visible.
vaadin-grid also calls _showTooltip for header / footer cells (__onCellMouseEnter is added to every cell). getEventContext has no item for those sections, so hovering any column header throws.
Each throw is an unhandled promise rejection (__updateContent is async):
Uncaught (in promise) TypeError: Cannot destructure property 'gridtooltips' of 'item' as it is undefined.
Main still has the unguarded line.
Expected outcome
No error. When the context has no item, the generator returns no tooltip text, as 25.2.x did.
Click Show grid. One Cannot destructure property 'gridtooltips' of 'item' as it is undefined error appears. Without the setVisible(false), it appears on initial render instead.
Hover the Value column header. The same error appears again on each hover.
Hover a body cell. The tooltip still works.
Suggested fix: const { gridtooltips } = item ?? {};, or restore the item && guard.
Fixed the regression from #9697 and added test coverage.
Tasks
Read issue and locate the generator
Fix the generator to guard against missing item
Add a test
Build & verify (module + test sources compile, spotless:apply clean)
Commit and push
What changed
Grid.java — restored the missing-item guard in the slotted <vaadin-tooltip> generator:
const{ gridtooltips }=item??{};
The generator is invoked with no item twice: once with the default empty context ({}) when the tooltip element attaches (first render / hidden-grid-becomes-visible), and again for header/footer cells on hover. Both used to throw Cannot destructure property 'gridtooltips' of 'item' as it is undefined.
GridTooltipIT.java
Added hoverOverColumnHeader_shouldNotProduceErrors — hovers a column header (no item in the event context) and asserts no browser errors. This fails without the fix.
Tightened tooltipGenerator_shouldNotProduceErrors to use the strict checkLogsForErrors(). It previously suppressed Cannot read properties of undefined, which was hiding exactly this class of error.
Note
I compiled the modules and formatted the code, but did not run the browser-based integration tests here (they need a running Jetty server + browser). Worth a CI run to confirm the two GridTooltipIT cases pass.
Activity
web-padawan commentedon Sep 26, 2026
Thanks for the issue. Sorry for the inconvenience, missed this during the review. Will work on a fix.
web-padawan commentedon Sep 26, 2026
@claude fix generator and add a test
claude commentedon Sep 26, 2026
Claude finished @web-padawan's task in 3m 43s —— View job •
claude/issue-10247-20260926-1202• Create PR ➔Done ✅
Fixed the regression from #9697 and added test coverage.
Tasks
itemspotless:applyclean)What changed
Grid.java— restored the missing-itemguard in the slotted<vaadin-tooltip>generator:itemtwice: once with the default empty context ({}) when the tooltip element attaches (first render / hidden-grid-becomes-visible), and again for header/footer cells on hover. Both used to throwCannot destructure property 'gridtooltips' of 'item' as it is undefined.GridTooltipIT.javahoverOverColumnHeader_shouldNotProduceErrors— hovers a column header (noitemin the event context) and asserts no browser errors. This fails without the fix.tooltipGenerator_shouldNotProduceErrorsto use the strictcheckLogsForErrors(). It previously suppressedCannot read properties of undefined, which was hiding exactly this class of error.Note
I compiled the modules and formatted the code, but did not run the browser-based integration tests here (they need a running Jetty server + browser). Worth a CI run to confirm the two
GridTooltipITcases pass.• Branch:
claude/issue-10247-20260926-1202vaadin-bot commentedon Sep 29, 2026
This ticket/PR has been released with Vaadin 25.4.0-alpha1.