For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • Monite SDK
    • Overview
  • Drop-in
    • Drop-in overview
    • Drop-in theming
    • Drop-in localization
    • Iframe App
  • React SDK
    • Overview
      • Overview
      • ApprovalPolicies
      • ApprovalPoliciesTable
      • ApprovalPolicyDetails
      • ApprovalRequests
      • ApprovalRequestsTable
      • CounterpartDetails
      • Counterparts
      • CounterpartsTable
      • CreditNotesTable
      • DocumentNumber
      • InvoiceDetails
      • InvoicesTable
      • LayoutAndLogo
      • Onboarding
      • OtherSettings
      • PayableDetails
      • Payables
      • PayablesTable
      • ProductDetails
      • Products
      • ProductsTable
      • QuotesTable
      • Receivables
      • ReceivablesTable
      • RolesAndPolicies
      • TagFormModal
      • Tags
      • TagsTable
      • TemplateSettings
      • UserRoleDetails
      • UserRoles
      • UserRolesTable
    • SDK customization
    • SDK localization
    • SDK theming
    • SDK releases
    • v4 migration guide
LogoLogo
API StatusPartner Portal
On this page
  • Overview
  • Permissions
  • Preview
  • Usage
  • Props
React SDKComponents and wrappers

ProductDetails component

Was this page helpful?
Previous

Products component

Next
Built with

Overview

The ProductDetails component renders the interface for creating new products and viewing product information. It displays details of an existing product item and allows a user to edit the product.

Permissions

To view details of an existing product, the entity user must have read permissions for the product object. To create, edit, and delete products, they must also have create, update, or delete permissions for the product object. For more information, see List of permissions.

Preview

Products component preview
Products component preview

Usage

You can use the ProductDetails component to create, view, edit, and delete details of an existing product. To create a new product, use the ProductDetails component without any props as shown:

1import { Dialog, ProductDetails } from "@monite/sdk-react"
2
3...
4
5// TODO: This component must be rendered within the MoniteProvider wrapper
6const ProductDetailsPage = () => {
7 return (
8 <Dialog open alignDialog="right">
9 <ProductDetails />
10 </Dialog>
11 );
12};

To view details of an existing product, use the ProductDetails component with the id prop as shown:

1import { Dialog, ProductDetails } from "@monite/sdk-react"
2
3...
4
5// TODO: This component must be rendered within the MoniteProvider wrapper
6const ProductDetailsPage = () => {
7 return (
8 <Dialog open alignDialog="right">
9 <ProductDetails id="PRODUCT_ID" />
10 </Dialog>
11 );
12};

To edit details of an existing product, you must provide the product ID via the id prop and set the initialView prop to Edit mode.

1import { Dialog, ProductDetails } from "@monite/sdk-react"
2
3...
4
5// TODO: This component must be rendered within the MoniteProvider wrapper
6const ProductDetailsPage = () => {
7 return (
8 <Dialog open alignDialog="right">
9 <ProductDetails
10 id="PRODUCT_ID"
11 initialView="edit"
12 />
13 </Dialog>
14 );
15};

Props

PropTypeDescription
defaultValuesobjectThis object is used to set default form values when creating a new product.
idstringThis is a required prop that accepts the UUID of the product to be displayed.
initialView("edit"| "read")The initialView prop determines whether the component is rendered in Read or Edit mode. Defaults to read.
onCreatedfunctionThis callback is triggered when a new product is created.
onDeletedfunctionThis callback is triggered after a product is deleted.
onEditfunctionThis callback is triggered when a product is edited.
onUpdatedfunctionThis callback is triggered when a product information is updated.