Components
Kind: element (inline) · Session key: customerPicker · React: <FinBazeCustomerPicker />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { customerPicker: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: relations. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
None.
Options#
Passed to instance.create("customer-picker", options) or as props.
| Option | Type | |
|---|---|---|
value | string | The customer chosen at first. |
label | string | The field label. |
disabled | boolean | Show the field but do not allow changes. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
change | onChange |
Use it#
import { FinBazeCustomerPicker } from "@finbaze/embed-react";
<FinBazeCustomerPicker />
const component = instance.create("customer-picker");
component.mount("#finbaze");