fix(#648): fixes xforms-value-changed firing when editing submission#649
fix(#648): fixes xforms-value-changed firing when editing submission#649garethbowen merged 1 commit intomainfrom
Conversation
🦋 Changeset detectedLatest commit: c429397 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
| 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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
This was another refactor which simplifies the code quite a bit, but would appreciate your take as you're familiar with the geopoint code.
There was a problem hiding this comment.
I was thinking there might be something about the expression from the action. I tested the create and edit submissions in Central and didn't find any issues.
The value from the geolocation provider has already been validated and encoded in L273.
I think it's fine.
|
I'll review this and test it first thing tomorrow |
| action.computation.expression, | ||
| point | ||
| ); | ||
| setRelevantValue(point); |
There was a problem hiding this comment.
I was thinking there might be something about the expression from the action. I tested the create and edit submissions in Central and didn't find any issues.
The value from the geolocation provider has already been validated and encoded in L273.
I think it's fine.
Closes #648
I have verified this PR works in these browsers (latest versions):
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