I have a Forge app that provides a custom field using UI Kit2.
jira:customField:
- key: cf-attachment
name: Attachment Selector
description: Attachment selector custom field
type: string
collection: list
resource: view-field
render: native
edit:
resource: edit-field
render: native
isInline: true
resolver:
function: resolver
When I create a new issue, I can see that the value of the custom field is submitted when the issue is created, i.e. the onSubmit function of the CustomFieldEdit component is not called until you hit “Create”.
However, in the new issue transition experience when placing the custom field on a transition screen, the value of the custom field is submitted on blur, i.e. every time the field loses focus.
This presents me with two problems:
- The user will be confused if they cancel the transition but the value of the custom field has in fact changed, even though they never submitted the transition screen
- I need to perform a final action when the transition screen is submitted
I have tried disableSubmitOnBlur on the CustomFieldEdit component, but when I do that, then onSubmit is never called and the transition screen never closes,