vaadin / flow-components

Java counterpart of Vaadin Web Components
82 stars 63 forks source link

NPE in Select column of grid pro in invoice editor #1683

Open alvarezguille opened 4 years ago

alvarezguille commented 4 years ago

To reproduce:

Results in exception and empty editor: image

Server-side stack trace

java.lang.NullPointerException
    at com.vaadin.invoice.editor.InvoiceEditor.lambda$new$58fe9139$7(InvoiceEditor.java:221)
    at com.vaadin.flow.component.gridpro.EditColumnConfigurator.lambda$select$3fd07578$1(EditColumnConfigurator.java:212)
    at com.vaadin.flow.component.gridpro.GridPro.lambda$setup$9b1b5227$1(GridPro.java:118)
    at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:205)
    at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:373)
    at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:264)
    at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:431)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at com.vaadin.flow.internal.nodefeature.ElementListenerMap.fireEvent(ElementListenerMap.java:431)
    at com.vaadin.flow.server.communication.rpc.EventRpcHandler.handleNode(EventRpcHandler.java:59)
    at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:64)
    at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:378)
    at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$1(ServerRpcHandler.java:359)
    at java.util.ArrayList.forEach(ArrayList.java:1257)
    at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:359)
    at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:301)
    at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:87)
    at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
    at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1540)
    at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:246)

Client-side error:

Uncaught TypeError: Cannot read property 'addEventListener' of null
    at HTMLElement._startCellEdit (webpack-internal:///../node_modules/@vaadin/vaadin-grid-pro/src/vaadin-grid-pro-edit-column.js?babel-target=es6:309)
    at HTMLElement._startEdit (webpack-internal:///../node_modules/@vaadin/vaadin-grid-pro/src/vaadin-grid-pro-inline-editing-mixin.js?babel-target=es6:281)
    at HTMLElement._enterEditFromEvent (webpack-internal:///../node_modules/@vaadin/vaadin-grid-pro/src/vaadin-grid-pro-inline-editing-mixin.js?babel-target=es6:237)
    at HTMLElement.eval (webpack-internal:///../node_modules/@vaadin/vaadin-grid-pro/src/vaadin-grid-pro-inline-editing-mixin.js?babel-target=es6:127)

Line 309 corresponds to https://github.com/vaadin/vaadin-grid-pro/blob/bd3ece46dbf0777c30066d912a9db6942e0dd992/src/vaadin-grid-pro-edit-column.html#L298

web-padawan commented 4 years ago

Confirmed the issue, although now it manifests differently: no NPE but editor is not closed. This results in being able to open many editors at the same time, which is a bug.

dblclick