Skip to content

fix(#648): fixes xforms-value-changed firing when editing submission#649

Open
garethbowen wants to merge 1 commit intomainfrom
648-do-not-fire-value-changed-on-load
Open

fix(#648): fixes xforms-value-changed firing when editing submission#649
garethbowen wants to merge 1 commit intomainfrom
648-do-not-fire-value-changed-on-load

Conversation

@garethbowen
Copy link
Collaborator

Closes #648

I have verified this PR works in these browsers (latest versions):

  • Chrome
  • Firefox
  • Safari (macOS)
  • Safari (iOS)
  • Chrome for Android
  • Not applicable

What else has been done to verify that this works as intended?

Why is this the best possible solution? Were any other approaches considered?

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Do we need any specific form for testing your changes? If so, please attach one.

What's changed

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: c429397

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@getodk/xforms-engine Patch
@getodk/scenario Patch
@getodk/web-forms Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +80 to +89
const instanceFile = new File([options.editInstance], INSTANCE_FILE_NAME, {
type: INSTANCE_FILE_TYPE,
});
const instanceData = new FormData();
instanceData.set(INSTANCE_FILE_NAME, instanceFile);
const instance = {
inputType: 'FORM_INSTANCE_INPUT_RESOLVED' as ResolvedFormInstanceInputType,
data: [instanceData as InstanceData] as const,
};
return editInstance(formResource, instance, initOptions);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a refactor to make it easier to test edits - now you just pass in the xml string.

action.computation.expression,
point
);
setRelevantValue(point);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was another refactor which simplifies the code quite a bit, but would appreciate your take as you're familiar with the geopoint code.

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.

Editing a submission with an xforms-value-changed action fires update on load

1 participant