Components
Kind: element (inline) · Session key: categoryPicker · React: <FinBazeCategoryPicker />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { categoryPicker: { enabled: true } }
}) { clientSecret }
}
Requirements#
No feature requirements.
Component features#
None.
Options#
Passed to instance.create("category-picker", options) or as props.
| Option | Type | |
|---|---|---|
value | string | The account code chosen at first. |
kind | 'cost' | 'revenue' | 'any' | Which categories are offered. Defaults to any. |
name | string | Your name for the field; it comes back in the change event. |
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 { FinBazeCategoryPicker } from "@finbaze/embed-react";
<FinBazeCategoryPicker />
const component = instance.create("category-picker");
component.mount("#finbaze");