diff --git a/src/utils/supportRequestsFormUtils.tsx b/src/utils/supportRequestsFormUtils.tsx index bd8a0bd06..808dbc8d2 100644 --- a/src/utils/supportRequestsFormUtils.tsx +++ b/src/utils/supportRequestsFormUtils.tsx @@ -32,6 +32,21 @@ export function appendTextInQuestionsField(webview: WebviewTag, text: string) { }); } +/** + * + * @param webview + * @param text + * This helper function is for appending flipper trace in the questions input text field. + * It also updates the Flipper trace state in the form which makes it pass the validation. + * One should use it only for the pages backed by NTUsersFormContainer.react.js + */ +export function sendFlipperTrace(webview: WebviewTag, text: string) { + webview.send('hostMessage', { + type: 'flipperTrace', + payload: text, + }); +} + /** * * @param webview