Skip to content

Commit 33730f3

Browse files
authored
Add comment on getTitle
1 parent 9a8436f commit 33730f3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/columns/styling.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ Below is a copy of the relevant sections from [datatable styling](../datatable/s
4545

4646
Set a list of attributes to override on the th elements.
4747

48+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
49+
```php
50+
$column->getTitle()
51+
```
52+
4853
```php
4954
public function configure(): void
5055
{
@@ -204,6 +209,11 @@ public function configure(): void
204209

205210
Set a list of attributes to override on the td elements. For example, changing the background color between red/green based on whether the "total" field is over or under 1000.
206211

212+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
213+
```php
214+
$column->getTitle()
215+
```
216+
207217
```php
208218
public function configure(): void
209219
{

docs/datatable/styling.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ public function configure(): void
150150

151151
Set a list of attributes to override on the th elements.
152152

153+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
154+
```php
155+
$column->getTitle()
156+
```
157+
153158
```php
154159
public function configure(): void
155160
{
@@ -311,6 +316,11 @@ public function configure(): void
311316

312317
Set a list of attributes to override on the td elements
313318

319+
If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make()
320+
```php
321+
$column->getTitle()
322+
```
323+
314324
```php
315325
public function configure(): void
316326
{

0 commit comments

Comments
 (0)