Invisible components break grid editor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
In Vaadin Framework 8.4.13, when you are registering a component to be used as a grid editor for a column, if that component happens to be invisible, it completely breaks the grid. Reason: CustomEditorHandler's getWidget() method tries to get the editor component by its connector ID. Now, if the connector ID is null, then it correctly renders an empty editor. However, if the connector ID is not null (as is the case with an existing, but invisible component), an attempt is made to retrieve the connector from the id-to-connector map, but the connector is not there (because the server-side code didn't push it as a dirty, but invisible connector), causing a client-side null pointer.
Steps to reproduce: create a editable Grid, register a field as a custom editor for any column, set that field to invisible, try to activate the editor.
Easiest fix is probably splitting EditorConnector::getWidget on line 146 to do a null check on the return of the getConnector() method.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in EditorConnector::getWidget around line 146 and review how CustomEditorHandler retrieves the editor connector by ID. Reproduce with an editable Grid using an invisible custom editor field, then verify that activating the editor no longer causes a client-side null pointer and renders an empty editor when the connector is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100