Skip to content

this.refresh() in onDataChange helper does not refresh the html form fields #105

Description

@Kshatra

It seems that this.refresh() in onDataChange helper does not refresh the html form fields, though setting original values to new values.
Seems like the issue is in this part of module.js code:

// Update reactiveValue without tracking it.
return Tracker.nonreactive(function () {

    // If the remote value is different from what's in initial data, set `newRemoteValue`.
    // Otherwise, leave it--the user's edits are still just as valid.
    if (!_.isEqual(component.value.get(), fieldValue)) {
        component.newRemoteValue.set(fieldValue);

        // Allow for remote data changes to pass through without user action.
        // This is important for the experience of some components.
        if (component.passThroughData) {
            component.refresh();
        } else {
            component.remoteValueChange.set(true);
            component.refresh(); //only refreshes if add this line
        }
    }
});

I've managed to get html input refresh by applying component.refresh() also in the else clause of if (component.passThroughData).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions