Create Merchant Risk RFI Element
createElement('mrmRfi', options?)
Use this function to create an instance of an individual Element.
Parameters
The type of element you are creating.
Options for creating mrmRfi Element.
Returns
MrmRfiElement | null1import { createElement } from '@airwallex/components-sdk';23const element = await createElement('mrmRfi', {4 hideHeader: true,5 hideNav: true,6});
MrmRfiElementOptions
Options for creating the RFI Element.
If set to true, the RFI flow header will be hidden, allowing platforms to configure a customized taskflow header on top the Element. By default, the header will be displayed within the RFI flow and shows the platform's content.
If set to true, the side navigation will be hidden. By default, standard side navigation will be shown.
The locale for the Element, applied to Element UI strings and error messages. By default, the locale configured in init() is used.
Use locale instead.
MrmRfiElement
Functions and external fields can be used in your integration flow with RFI Element.
mount(domElement)
Mounts Element to your HTML DOM.
Parameters
The container DOM element to mount the element.
Returns
void1// There are two ways to mount element:2// 1. Call with container DOM id3element.mount('container-dom-id');45// 2. Find the created DOM in existing HTML and call with container DOM element6const containerElement = document.getElementById('container-dom-id');7element.mount(containerElement);
on(eventCode, handler)
Listen to Element events.
Type Parameters
A generic type for event codes. This is typically inferred automatically and does not need to be specified explicitly.
Parameters
The callback function that will be called when the event occurs.
Returns
void1element.on('success', () => {2 // Handle success event3});