Skip to content

Commit 09790e7

Browse files
Merge pull request #136 from MrYamous/rowtemplate
Update rowTemplate method doc
2 parents 170fc1f + 698ac9e commit 09790e7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/table-component/component-columns.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ Column::make('Dish Availability', 'availability')
477477
]);
478478
```
479479

480-
### template
480+
### rowTemplate()
481481

482-
If you want to customize a record in the table without using Blade's processing, you can use the rowTemplate() method. This approach prevents the unnecessary creation of Blade components for the same field across different rows by leveraging JavaScript instead.
482+
If you want to customize a record in the table without using Blade's processing, you can use the `rowTemplate()` method. This approach prevents the unnecessary creation of Blade components for the same field across different rows by leveraging JavaScript instead.
483483

484484
**Consider the following example:**
485485

@@ -548,6 +548,11 @@ By doing so, the layout and styling are managed by JavaScript, which dynamically
548548
This approach reduces the overhead associated with generating Blade views for each row, leading to improved performance and easier maintenance, especially when dealing with large datasets.
549549
Instead of repeatedly rendering Blade components, the JavaScript-based solution efficiently handles the customization directly in the browser, making your application more responsive and streamlined.
550550

551+
<div class="onlinedemo custom-block">
552+
<p class="custom-block-title">🚀 See it in action</p>
553+
<p>See an interactive example using <a target="_blank" href="https://demo.livewire-powergrid.com/examples/row-templates">rowTemplate()</a>.</p>
554+
555+
</div>
551556

552557
## Custom Macros
553558

0 commit comments

Comments
 (0)