Skip to content

Bug fix: incorrect oldValue in InputFieldInitializer#1129

Open
happyhua wants to merge 1 commit intoDominoKit:developmentfrom
datalint:feature/input-field-old-value-not-updated
Open

Bug fix: incorrect oldValue in InputFieldInitializer#1129
happyhua wants to merge 1 commit intoDominoKit:developmentfrom
datalint:feature/input-field-old-value-not-updated

Conversation

@happyhua
Copy link
Copy Markdown
Contributor

When setValue (with either silent = true or false) is called on a formElement, the oldValue in InputFieldInitializer is not updated correctly. This can later lead to an incorrect oldValue being passed to formElement.triggerChangeListeners.

        TextBox box = new TextBox();

        box.withValue("Start");

        box.addChangeListener((oldValue, newValue) -> {
            // Expected oldValue is "Start", but the current code returns null/empty.
            DomGlobal.console.log(oldValue + ", " + newValue);
        });

        Domino.body().appendChild(box);

When setValue (with either silent = true or false) is called on a formElement, the oldValue in InputFieldInitializer is not updated correctly. This can later lead to an incorrect oldValue being passed to formElement.triggerChangeListeners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant