From 33730f31d36c079c01cc4cc705ad4da49fd55212 Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Sun, 29 Sep 2024 00:15:04 +0100 Subject: [PATCH] Add comment on getTitle --- docs/columns/styling.md | 10 ++++++++++ docs/datatable/styling.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/columns/styling.md b/docs/columns/styling.md index f7db2a4bd..7862c9566 100644 --- a/docs/columns/styling.md +++ b/docs/columns/styling.md @@ -45,6 +45,11 @@ Below is a copy of the relevant sections from [datatable styling](../datatable/s Set a list of attributes to override on the th elements. +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() +```php + $column->getTitle() +``` + ```php public function configure(): void { @@ -204,6 +209,11 @@ public function configure(): void 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. +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() +```php + $column->getTitle() +``` + ```php public function configure(): void { diff --git a/docs/datatable/styling.md b/docs/datatable/styling.md index b460371bf..9353ad00e 100644 --- a/docs/datatable/styling.md +++ b/docs/datatable/styling.md @@ -150,6 +150,11 @@ public function configure(): void Set a list of attributes to override on the th elements. +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() +```php + $column->getTitle() +``` + ```php public function configure(): void { @@ -311,6 +316,11 @@ public function configure(): void Set a list of attributes to override on the td elements +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() +```php + $column->getTitle() +``` + ```php public function configure(): void {