From bcc4ea14bbf49088d708987451fa9800bc2eb3bf Mon Sep 17 00:00:00 2001 From: Niklas Forsdahl Date: Mon, 15 Apr 2024 11:02:31 +0300 Subject: [PATCH] Added initial user documentation for Nested GridFields. --- docs/en/index.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/en/index.md b/docs/en/index.md index c565963..e5eb80c 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -152,3 +152,17 @@ $paginator->setItemsPerPage(500); The first shown record will be maintained across page size changes, and the number of pages and current page will be recalculated on each request, based on the current first shown record and page size. + +Nested GridFields +----------------- + +The `GridFieldNestedForm` component allows you to nest GridFields in the UI. It can be used with `DataObject` subclasses +with the `Hierarchy` extension, or by specifying the relation used for nesting. + +```php +// Basic usage, defaults to the Children-method for Hierarchy objects. +$grid->getConfig()->addComponent(GridFieldNestedForm::create()); + +// Usage with custom relation +$grid->getConfig()->addComponent(GridFieldNestedForm::create()->setRelationName('MyRelation')); +```