
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@procore/labs-related-items
Advanced tools
Related Items component integrated with Procore endpoints.
RelatedItems is a component connected with Procore API.
yarn add @procore/labs-related-items
@procore/core-react, @procore/core-icons, @procore/labs-toast-alert, react and styled-components are listed as external peer dependencies. The package will not bundle the code, and requires the app client to provide it as a dependency. The external peer dep is to assure React Context is consistent in a client's React tree, the child consumers can reference the correct parent provider. If the package uses latest features or bug fixes and a new minimum version of core-react is required, it should be considered a breaking change as the peer dependency version must be met.
RelatedItems depend on CORE I18nProvider and @procore/labs-toast-alert's ToastAlertProvider to work properly.
import { I18nProvider } from '@procore/core-react';
import { ToastAlertProvider } from '@procore/labs-toast-alert';
import { RelatedItems } from '@procore/labs-related-items';
<I18nProvider>
<ToastAlertProvider>
<RelatedItems.Provider
procoreEnv={...}
holder={...}
permissions={...}
>
<RelatedItems/>
</RelatedItems.Provider>
</ToastAlertProvider>
</I18nProvider>
RelatedItems.ProviderRelatedItems.Provider holds and shares application configuration and state between RelatedItems, RelatedItems.Sidebar and RelatedItems.Count.
The primary configuration points are:
procoreEnv - describes Procore project and company,holder - identifies the entity which holds related items.permissions - describes current user permissions to link and unlink items, has shape: { canLinkItem: boolean; canUnlinkItem: boolean; }It is recommended to put RelatedItems.Provider on the top of the application tree, with the rest of providers.
RelatedItems.PanelRelatedItems.Panel component is responsible for displaying the Related Item creation form. It is intended to be placed inside DetailPage.Aside CORE component and requires no configuration.
RelatedItems.Panel#ref should be used to control it's visibility. ref contains open and close methods, as well as rootElRef containing the DOM root of the panel.
RelatedItems.CountRelatedItems.Count component is responsible for dynamically displaying the total amount of related items. It is intended to be placed inside DetailPage.Tabs CORE component. format prop can be used to alternate the view of a counter.
RelatedItemsRelatedItems component is responsible for displaying and editing the list of related items. It is intended to be placed inside DetailPage.Body CORE component.
Pass required permissions prop to RelatedItems.Provider.
Example PR for 1.0.0 version migration
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.