TypeError: Cannot read property ‘querySelector’ of undefined
and
(TypeError) : window.Vaadin.Flow.contextMenuConnector.generateItems is not a function
Any ideas?
TypeError: Cannot read property ‘querySelector’ of undefined
and
(TypeError) : window.Vaadin.Flow.contextMenuConnector.generateItems is not a function
Any ideas?
Hi!
I couldn’t reproduce your issue, at least with a really simple test app using ContextMenu.
Based on the second error, it seems that your project still uses an old version of a JavaScript file contextMenuConnector.js. Maybe your browser is caching the file? Try making a hard refresh, if you haven’t already (or disable the caching). Maybe also try running mvn clean.
Many Thanks.
This was effectively related to the browser cache.
We also had similar issues due to a Vaadin upgrade.
Shouldn’t Vaadin make sure that newer versions don’t use the cached javascript from older versions? This is possible by e.g. adding the Vaadin version as a query parameter to the requests that load the javascript.