vaadin / vaadin/framework

Invalid selection data when setting a new Container as Datasoruce in grid

Open
#10,416 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Stale v7
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

If you have a Grid with SingleSelection enabled, select a item and then set a new Container as datasource and try to select a new Item you'll get invalid selection data in the SelectionListener.

I have to create a new instance of the corresponding SelectionModel when I re-set the ContainerDataSource.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a Grid using SingleSelection: select an item, replace its ContainerDataSource, then select another item. Start by tracing Grid, SelectionModel, SelectionListener, and ContainerDataSource interactions; done means the listener receives valid selection data after the datasource is replaced without requiring a new SelectionModel.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.