Files
klz-cables.com/.pnpm-store/v10/files/7b/9499a7a899df91f2dd27ea226309d4bb0d00f1710257bcba6a952314401647b1f8fe24967935b222e5ff97af6fa123fef1363f9be0618fb185d9d5e6c309be
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

33 lines
1.3 KiB
Plaintext

import React from 'react';
/**
* All fields are wrapped in a `FieldPathContext` provider by default.
* The `useFieldPath` hook will return this value if it exists, not the path the field was explicitly given.
* This means if you render a field directly, you will need to wrap it with a new `FieldPathContext` provider.
* Otherwise, it will return the parent's path, not the path it was explicitly given.
* @example
* ```tsx
* 'use client'
* import React from 'react'
* import { TextField, FieldPathContext } from '@payloadcms/ui'
* import type { TextFieldClientComponent } from 'payload'
*
* export const MyCustomField: TextFieldClientComponent = (props) => {
* return (
* <FieldPathContext value="path.to.some.other.field">
* <TextField {...props} />
* </FieldPathContext>
* )
* }
* ```
*
* @experimental This is an experimental API and may change at any time. Use at your own risk.
*/
export declare const FieldPathContext: React.Context<string>;
/**
* Gets the current field path from the nearest `FieldPathContext` provider.
* All fields are wrapped in this context by default.
*
* @experimental This is an experimental API and may change at any time. Use at your own risk.
*/
export declare const useFieldPath: () => string;
//# sourceMappingURL=context.d.ts.map