From c0a4a635c1a87dcca6ed0b7e86e22d331c027b5a Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 21 May 2024 12:14:48 +0200 Subject: [PATCH] add multiple components per page --- .../get-started/rendering-a-powergrid-table.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/get-started/rendering-a-powergrid-table.md b/docs/get-started/rendering-a-powergrid-table.md index 8a44511..5f25c23 100644 --- a/docs/get-started/rendering-a-powergrid-table.md +++ b/docs/get-started/rendering-a-powergrid-table.md @@ -47,6 +47,22 @@ For reference, the following example utilizes the class `app/Livewire/Tables/Dis // [!code ++] ``` +## Multiple Components Per Page + +To display more than one PowerGrid component you must first set a unique `TableName` to each component. Read more about [configuring table name](/table-component/component-configuration.html#table-name). + +In order to have pagination on each component, you may also need to configure an unique "page=" parameter for each component. Read more about [configuring Page Parameter](/pagination.html#url-page-parameter). + +Then, you can just include two `` tags as demonstrated below. + +```php +// resources/views/my-view.blade.php + + // [!code ++:3] + + +``` + ## Component Attributes ### Passing Attributes @@ -60,7 +76,7 @@ In the next example, we are passing the [`tableName`](/table-component/component // [!code ++:3] - + ``` ### Passing Custom Attributes