Skip to content

Spreadsheet does not trigger addCellValueChangeListener for anything else than text input #4588

@Artur-

Description

@Artur-

Description

In order to sync a spreadsheet cell value with an external component, I do

        spreadsheet.addCellValueChangeListener(event -> {
            CellReference a2 = new CellReference(spreadsheet.getCell("A2"));
            CellReference d4 = new CellReference(spreadsheet.getCell("D4"));
            if (event.getChangedCells().contains(a2) || event.getChangedCells().contains(d4)) {
                updateInvoiceNumberAndSource();
            }

        });

This works fine when typing text but when doing undo, redo or pasting a value, the event is not triggered

Expected outcome

A CellValueChangeListener is triggered whenever the Cell Value Changes

Minimal reproducible example

Above

Steps to reproduce

  1. Paste or do undo/reado

Environment

Vaadin version(s): 24.0.0.alpha9
OS: mac

Browsers

Chrome

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions