react-data-table-component-config.mdx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. title: "ReactDataTableComponentConfig"
  3. generated: true
  4. ---
  5. <GenerationInfo sourceFile="packages/admin-ui/src/lib/react/src/register-react-data-table-component.ts" sourceLine="19" packageName="@vendure/admin-ui" />
  6. Configures a [CustomDetailComponent](/reference/admin-ui-api/custom-detail-components/custom-detail-component#customdetailcomponent) to be placed in the given location.
  7. ```ts title="Signature"
  8. interface ReactDataTableComponentConfig {
  9. tableId: DataTableLocationId;
  10. columnId: DataTableColumnId;
  11. component: ElementType;
  12. props?: Record<string, any>;
  13. }
  14. ```
  15. <div className="members-wrapper">
  16. ### tableId
  17. <MemberInfo kind="property" type={`DataTableLocationId`} />
  18. The location in the UI where the custom component should be placed.
  19. ### columnId
  20. <MemberInfo kind="property" type={`DataTableColumnId`} />
  21. The column in the table where the custom component should be placed.
  22. ### component
  23. <MemberInfo kind="property" type={`ElementType`} />
  24. The component to render in the table cell. This component will receive the `rowItem` prop
  25. which is the data object for the row, e.g. the `Product` object if used in the `product-list` table.
  26. ### props
  27. <MemberInfo kind="property" type={`Record<string, any>`} />
  28. Optional props to pass to the React component.
  29. </div>