Skip to content

The "isFromClient" flag always false when selection mode is multi  #36

@krissvaa

Description

@krissvaa

If SelectionGrid is set as a multi-select and then the user selects some rows - the selectionListener should be receiving events as from the client, but in this case it is false.

Example:

var grid = new SelectionGrid<String>();
grid.setSelectionMode(Grid.SelectionMode.MULTI);
grid.addSelectionListener(event -> {
			if (event.isFromClient()) { //always false
				onSelectionChanged(); //never executed
			}
		});

Problem seems to be when calling the selectRangeOnly method in this line:

asMultiSelect().updateSelection(newSelectedItems, oldSelectedItems);

Vaadin 23.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions