Hi everyone!
I have a built a custom lookup field React PCF virtual control using Fluent UI that uses a typeahead endpoint to return search results from a third party API. On selection of a result, the PCF control captures 8 fields from the selected result and outputs each one of these to a field on the form where the PCF is embedded.
This PCF control works perfectly inside the model driven app, but I'm running in to issues when using it in a multistep form in the portal. The PCF control renders and functions exactly as I would expect, I am able to perform the search and select a result. In the debugger, I can see the getOutputs method triggered and I can see the values being assigned to each of the output values as I would expect.
This is where the control drops the ball as the component does not update any of the fields on the form as it does in the model driven app. I have bound the control to one of the 8 fields and on inspection of that element in Dev Tools, I can see that the value property of the hidden input has been updated.
I should add at this point that all the fields I'm expecting to be updated are on the same step of the portal form.
I have tried adding a custom onchange event to the bound field on the form using jQuery but even though the value of the element is updated, the onchange method is never called.
The only theory I have left is that MS doesn't support PCF controls on multi-step forms as all the tutorials I can find are about how to use them on basic forms. Can anyone confirm this or maybe point me in the right direction please?
Thanks!
Cam