Send flipper trace as a separate message
Summary: This diff sends flipper trace as a separate message so that the form can update the state which can be used for validation. If the user doesn't click on "Flipper Trace" then it will show a validation error. WWW side changes are here D17810526. Merge this diff only when www is landed. Reviewed By: jknoxville Differential Revision: D17812023 fbshipit-source-id: 35f17f9e58fc08cde3928072dc66758b1c507bcb
This commit is contained in:
committed by
Facebook Github Bot
parent
7dd6f9a81f
commit
e31f526618
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user