From 11fbd707eb0806e8862c6d4ea2a944d709edf03a Mon Sep 17 00:00:00 2001
From: Joe <104938042+lrljoe@users.noreply.github.com>
Date: Thu, 11 Jul 2024 03:21:40 +0100
Subject: [PATCH] Adjust column documentation (#1767)
* Update OtherColumnTypes docs
* Add Links for Additional Docs
---
docs/column-types/array_column.md | 20 ++++++-
docs/column-types/avg_column.md | 20 ++++++-
docs/column-types/boolean_columns.md | 18 ++++++-
docs/column-types/button_group_column.md | 9 +++-
docs/column-types/color_columns.md | 18 ++++++-
docs/column-types/component_column.md | 17 +++++-
docs/column-types/count_column.md | 20 ++++++-
docs/column-types/date_columns.md | 17 +++++-
docs/column-types/image_columns.md | 18 ++++++-
docs/column-types/link_columns.md | 18 ++++++-
.../column-types/livewire_component_column.md | 29 +++++++++-
docs/column-types/standard_column.md | 31 +++++++++++
docs/column-types/sum_column.md | 20 ++++++-
docs/column-types/wire_link_column.md | 18 ++++++-
docs/columns/available-methods.md | 2 +-
docs/columns/footer.md | 2 +-
docs/columns/other-column-types.md | 53 +++++++++++++++----
docs/columns/secondary-header.md | 2 +-
18 files changed, 301 insertions(+), 31 deletions(-)
create mode 100644 docs/column-types/standard_column.md
diff --git a/docs/column-types/array_column.md b/docs/column-types/array_column.md
index 1571da2b9..7802e78aa 100644
--- a/docs/column-types/array_column.md
+++ b/docs/column-types/array_column.md
@@ -1,6 +1,6 @@
---
title: Array Columns (beta)
-weight: 1
+weight: 2
---
Array columns provide an easy way to work with and display an array of data from a field.
@@ -19,4 +19,20 @@ You may define the default/empty value using the "emptyValue" method
```
ArrayColumn::make('notes', 'name')
->emptyValue('Unknown'),
-```
\ No newline at end of file
+```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/avg_column.md b/docs/column-types/avg_column.md
index faa653ca2..d5e4b32fb 100644
--- a/docs/column-types/avg_column.md
+++ b/docs/column-types/avg_column.md
@@ -1,6 +1,6 @@
---
title: Avg Columns (beta)
-weight: 2
+weight: 3
---
Avg columns provide an easy way to display the "Average" of a field on a relation.
@@ -11,4 +11,20 @@ Avg columns provide an easy way to display the "Average" of a field on a relatio
->sortable(),
```
-The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
\ No newline at end of file
+The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/boolean_columns.md b/docs/column-types/boolean_columns.md
index 32a759918..8732db839 100644
--- a/docs/column-types/boolean_columns.md
+++ b/docs/column-types/boolean_columns.md
@@ -1,6 +1,6 @@
---
title: Boolean Columns
-weight: 3
+weight: 4
---
Boolean columns are good if you have a column type that is a true/false, or 0/1 value.
@@ -79,3 +79,19 @@ If you would like the BooleanColumn to display a plain Yes/No, you can set:
BooleanColumn::make('Active')
->yesNo()
```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/button_group_column.md b/docs/column-types/button_group_column.md
index 5a3390049..da8ff7399 100644
--- a/docs/column-types/button_group_column.md
+++ b/docs/column-types/button_group_column.md
@@ -1,6 +1,6 @@
---
title: Button Group Columns
-weight: 4
+weight: 5
---
Button group columns let you provide an array of LinkColumns to display in a single cell.
@@ -32,3 +32,10 @@ ButtonGroupColumn::make('Actions')
}),
]),
```
+
+
+Please also see the following for other available methods:
+- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods](Available Methods)
+- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection](Column Selection)
+- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header](Secondary Header)
+- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer](Footer)
diff --git a/docs/column-types/color_columns.md b/docs/column-types/color_columns.md
index e4920144d..eeae20b2f 100644
--- a/docs/column-types/color_columns.md
+++ b/docs/column-types/color_columns.md
@@ -1,6 +1,6 @@
---
title: Color Columns
-weight: 5
+weight: 6
---
Color columns provide an easy way to a Color in a Column
@@ -39,3 +39,19 @@ You may also specify attributes to use on the div displaying the color, to adjus
];
}),
```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/component_column.md b/docs/column-types/component_column.md
index 0db9c9483..79611121f 100644
--- a/docs/column-types/component_column.md
+++ b/docs/column-types/component_column.md
@@ -1,6 +1,6 @@
---
title: Component Columns
-weight: 6
+weight: 7
---
Component columns let you specify a component name and attributes and provides the column value to the slot.
@@ -26,3 +26,18 @@ ComponentColumn::make('E-mail', 'email')
]),
```
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/count_column.md b/docs/column-types/count_column.md
index d33cf5df9..4b1fe6c3a 100644
--- a/docs/column-types/count_column.md
+++ b/docs/column-types/count_column.md
@@ -1,6 +1,6 @@
---
title: Count Columns (beta)
-weight: 7
+weight: 8
---
Count columns provide an easy way to display the "Count" of a relation.
@@ -11,4 +11,20 @@ Count columns provide an easy way to display the "Count" of a relation.
->sortable(),
```
-The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
\ No newline at end of file
+The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/date_columns.md b/docs/column-types/date_columns.md
index abc8bbb42..3e2e6ca0a 100644
--- a/docs/column-types/date_columns.md
+++ b/docs/column-types/date_columns.md
@@ -1,6 +1,6 @@
---
title: Date Columns
-weight: 8
+weight: 9
---
Date columns provide an easy way to display dates in a given format, without having to use repetitive format() methods or partial views.
@@ -26,3 +26,18 @@ DateColumn::make('Last Charged', 'last_charged_at')
->emptyValue('Not Found'),
```
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/image_columns.md b/docs/column-types/image_columns.md
index f816280af..5e6868792 100644
--- a/docs/column-types/image_columns.md
+++ b/docs/column-types/image_columns.md
@@ -1,6 +1,6 @@
---
title: Image Columns
-weight: 9
+weight: 10
---
Image columns provide a way to display images in your table without having to use `format()` or partial views:
@@ -24,3 +24,19 @@ ImageColumn::make('Avatar')
'alt' => $row->name . ' Avatar',
]),
```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/link_columns.md b/docs/column-types/link_columns.md
index cba4bc887..e3f3120a4 100644
--- a/docs/column-types/link_columns.md
+++ b/docs/column-types/link_columns.md
@@ -1,6 +1,6 @@
---
title: Link Columns
-weight: 10
+weight: 11
---
Link columns provide a way to display HTML links in your table without having to use `format()` or partial views:
@@ -22,3 +22,19 @@ LinkColumn::make('Action')
'alt' => $row->name . ' Avatar',
]),
```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/livewire_component_column.md b/docs/column-types/livewire_component_column.md
index b75172881..b12ada72e 100644
--- a/docs/column-types/livewire_component_column.md
+++ b/docs/column-types/livewire_component_column.md
@@ -1,5 +1,32 @@
---
title: Livewire Component (beta)
-weight: 11
+weight: 12
---
+Livewire Component Columns allow for the use of a Livewire Component as a Column.
+
+This is **not recommended** as due to the nature of Livewire, it becomes inefficient at scale.
+
+## component
+```
+LivewireComponentColumn::make('Action')
+ ->title(fn($row) => 'Edit')
+ ->component('PathToLivewireComponent'),
+
+```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/standard_column.md b/docs/column-types/standard_column.md
new file mode 100644
index 000000000..6f7844982
--- /dev/null
+++ b/docs/column-types/standard_column.md
@@ -0,0 +1,31 @@
+---
+title: Standard Column
+weight: 1
+---
+
+A standard Column has a multitude of different options, making it simple for you to display your data, as documented below:
+
+
diff --git a/docs/column-types/sum_column.md b/docs/column-types/sum_column.md
index 7f99f7cab..c643253a7 100644
--- a/docs/column-types/sum_column.md
+++ b/docs/column-types/sum_column.md
@@ -1,6 +1,6 @@
---
title: Sum Columns (beta)
-weight: 12
+weight: 13
---
Sum columns provide an easy way to display the "Sum" of a field on a relation.
@@ -11,4 +11,20 @@ Sum columns provide an easy way to display the "Sum" of a field on a relation.
->sortable(),
```
-The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
\ No newline at end of file
+The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/column-types/wire_link_column.md b/docs/column-types/wire_link_column.md
index 3577ad95b..eaee09537 100644
--- a/docs/column-types/wire_link_column.md
+++ b/docs/column-types/wire_link_column.md
@@ -1,6 +1,6 @@
---
title: Wire Link Column (beta)
-weight: 13
+weight: 14
---
WireLink columns provide a way to display Wired Links in your table without having to use `format()` or partial views, with or without a Confirmation Message
@@ -35,3 +35,19 @@ And you may also pass an array of attributes, which will be applied to the "butt
'class' => 'btn btn-danger',
]),
```
+
+Please also see the following for other available methods:
+
\ No newline at end of file
diff --git a/docs/columns/available-methods.md b/docs/columns/available-methods.md
index ab41c7095..26f34b926 100644
--- a/docs/columns/available-methods.md
+++ b/docs/columns/available-methods.md
@@ -25,7 +25,7 @@ Column::make(__('Address'))
### [Multi-column sorting](../sorting/available-methods#setsinglesortingstatus)
-In v2, multi-column sorting is **disabled by default**. To enable it you can set the `setSingleSortingDisabled()` method on the component.
+Multi-column sorting is **disabled by default**. To enable it you can set the `setSingleSortingDisabled()` method on the component.
```php
public function configure(): void
diff --git a/docs/columns/footer.md b/docs/columns/footer.md
index caf9a45d4..c4b3877e7 100644
--- a/docs/columns/footer.md
+++ b/docs/columns/footer.md
@@ -21,7 +21,7 @@ See also [footer component configuration](../footer/available-methods).
## Using a filter as a footer
-As of version 2.7, you can use a filter as a footer.
+You can use a filter as a footer.
```php
// Example filter
diff --git a/docs/columns/other-column-types.md b/docs/columns/other-column-types.md
index 2e515eedf..c3a8bd154 100644
--- a/docs/columns/other-column-types.md
+++ b/docs/columns/other-column-types.md
@@ -3,14 +3,45 @@ title: Other Column Types
weight: 4
---
-
-
-
-
-## Aggregate Columns
-
-### AvgColumn
-
-### CountColumn
-
-### SumColumn
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/columns/secondary-header.md b/docs/columns/secondary-header.md
index 31790b3e8..258db8d30 100644
--- a/docs/columns/secondary-header.md
+++ b/docs/columns/secondary-header.md
@@ -21,7 +21,7 @@ See also [secondary header component configuration](../secondary-header/availabl
## Using a filter as a secondary header
-As of version 2.7, you can use a filter as a header.
+You can use a filter as a header.
```php
// Example filter