Skip to content

Commit b80be2d

Browse files
authored
Update Docs (rappasoft#1876)
1 parent 1f0c14d commit b80be2d

File tree

7 files changed

+167
-122
lines changed

7 files changed

+167
-122
lines changed

docs/bulk-actions/customisations.md renamed to docs/bulk-actions/styling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Customising Style
2+
title: Styling
33
weight: 5
44
---
55

docs/datatable/available-methods.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,21 @@ public function configure(): void
1818
}
1919
```
2020

21+
### useComputedPropertiesDisabled
22+
23+
If you have published the Views **prior to v3.4.5**, and do not wish to remove the published views, then you should add the following call, which will disable the new Computed Properties behaviour. Note that publishing the views is not recommended!
24+
25+
```php
26+
public function configure(): void
27+
{
28+
$this->useComputedPropertiesDisabled();
29+
}
30+
```
31+
32+
2133
## Attributes
2234

23-
Documentation for Data Table Styling/Attributes is now: <a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/styling" aria-label="Documentation for Data Table Styling" >Here</a>
35+
Documentation for Data Table Styling/Attributes is now: [Here](../datatable/styling)
2436

2537
## Offline
2638

docs/footer/available-methods.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -82,66 +82,9 @@ public function configure(): void
8282
}
8383
```
8484

85-
---
86-
87-
## setFooterTrAttributes
88-
89-
Set any attributes on the footer row element.
90-
91-
```php
92-
public function configure(): void
93-
{
94-
$this->setFooterTrAttributes(function($rows) {
95-
return ['class' => 'bg-gray-100'];
96-
});
97-
}
98-
```
99-
100-
By default, this replaces the default classes on the tr element, if you would like to keep them, set the default flag to true.
101-
102-
```php
103-
public function configure(): void
104-
{
105-
$this->setFooterTrAttributes(function($rows) {
106-
return [
107-
'default' => true,
108-
'class' => 'bg-gray-100'
109-
];
110-
});
111-
}
112-
```
113-
114-
## setFooterTdAttributes
115-
116-
Set any attributes on the footer row cells.
117-
118-
```php
119-
public function configure(): void
120-
{
121-
$this->setFooterTdAttributes(function(Column $column, $rows) {
122-
if ($column->isField('id')) {
123-
return ['class' => 'text-red-500'];
124-
}
125-
});
126-
}
127-
```
128-
129-
By default, this replaces the default classes on the td element, if you would like to keep them, set the default flag to true.
130-
131-
```php
132-
public function configure(): void
133-
{
134-
$this->setFooterTdAttributes(function(Column $column, $rows) {
135-
if ($column->isField('id')) {
136-
return [
137-
'default' => true,
138-
'class' => 'text-red-500'
139-
];
140-
}
141-
});
142-
}
143-
```
14485

14586
---
14687

147-
See also [footer column configuration](../columns/footer).
88+
See also
89+
[footer styling](./styling).
90+
[footer column configuration](../columns/footer).

docs/footer/styling.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Styling
3+
weight: 2
4+
---
5+
6+
## setFooterTrAttributes
7+
8+
Set any attributes on the footer row element.
9+
10+
```php
11+
public function configure(): void
12+
{
13+
$this->setFooterTrAttributes(function($rows) {
14+
return ['class' => 'bg-gray-100'];
15+
});
16+
}
17+
```
18+
19+
By default, this replaces the default classes on the tr element, if you would like to keep them, set the default flag to true.
20+
21+
```php
22+
public function configure(): void
23+
{
24+
$this->setFooterTrAttributes(function($rows) {
25+
return [
26+
'default' => true,
27+
'class' => 'bg-gray-100'
28+
];
29+
});
30+
}
31+
```
32+
33+
## setFooterTdAttributes
34+
35+
Set any attributes on the footer row cells.
36+
37+
```php
38+
public function configure(): void
39+
{
40+
$this->setFooterTdAttributes(function(Column $column, $rows) {
41+
if ($column->isField('id')) {
42+
return ['class' => 'text-red-500'];
43+
}
44+
});
45+
}
46+
```
47+
48+
By default, this replaces the default classes on the td element, if you would like to keep them, set the default flag to true.
49+
50+
```php
51+
public function configure(): void
52+
{
53+
$this->setFooterTdAttributes(function(Column $column, $rows) {
54+
if ($column->isField('id')) {
55+
return [
56+
'default' => true,
57+
'class' => 'text-red-500'
58+
];
59+
}
60+
});
61+
}
62+
```

docs/secondary-header/available-methods.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -43,66 +43,9 @@ public function configure(): void
4343
}
4444
```
4545

46-
---
47-
48-
## setSecondaryHeaderTrAttributes
49-
50-
Set any attributes on the secondary header row element.
51-
52-
```php
53-
public function configure(): void
54-
{
55-
$this->setSecondaryHeaderTrAttributes(function($rows) {
56-
return ['class' => 'bg-gray-100'];
57-
});
58-
}
59-
```
60-
61-
By default, this replaces the default classes on the tr element, if you would like to keep them, set the default flag to true.
62-
63-
```php
64-
public function configure(): void
65-
{
66-
$this->setSecondaryHeaderTrAttributes(function($rows) {
67-
return [
68-
'default' => true,
69-
'class' => 'bg-gray-100'
70-
];
71-
});
72-
}
73-
```
74-
75-
## setSecondaryHeaderTdAttributes
76-
77-
Set any attributes on the secondary header row cells.
78-
79-
```php
80-
public function configure(): void
81-
{
82-
$this->setSecondaryHeaderTdAttributes(function(Column $column, $rows) {
83-
if ($column->isField('id')) {
84-
return ['class' => 'text-red-500'];
85-
}
86-
});
87-
}
88-
```
89-
90-
By default, this replaces the default classes on the td element, if you would like to keep them, set the default flag to true.
91-
92-
```php
93-
public function configure(): void
94-
{
95-
$this->setSecondaryHeaderTdAttributes(function(Column $column, $rows) {
96-
if ($column->isField('id')) {
97-
return [
98-
'default' => true,
99-
'class' => 'text-red-500'
100-
];
101-
}
102-
});
103-
}
104-
```
10546

10647
---
10748

108-
See also [secondary header column configuration](../columns/secondary-header).
49+
See also:
50+
[secondary header styling](./styling).
51+
[secondary header column configuration](../columns/secondary-header).

docs/secondary-header/styling.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Styling
3+
weight: 2
4+
---
5+
6+
## setSecondaryHeaderTrAttributes
7+
8+
Set any attributes on the secondary header row element.
9+
10+
```php
11+
public function configure(): void
12+
{
13+
$this->setSecondaryHeaderTrAttributes(function($rows) {
14+
return ['class' => 'bg-gray-100'];
15+
});
16+
}
17+
```
18+
19+
By default, this replaces the default classes on the tr element, if you would like to keep them, set the default flag to true.
20+
21+
```php
22+
public function configure(): void
23+
{
24+
$this->setSecondaryHeaderTrAttributes(function($rows) {
25+
return [
26+
'default' => true,
27+
'class' => 'bg-gray-100'
28+
];
29+
});
30+
}
31+
```
32+
33+
## setSecondaryHeaderTdAttributes
34+
35+
Set any attributes on the secondary header row cells.
36+
37+
```php
38+
public function configure(): void
39+
{
40+
$this->setSecondaryHeaderTdAttributes(function(Column $column, $rows) {
41+
if ($column->isField('id')) {
42+
return ['class' => 'text-red-500'];
43+
}
44+
});
45+
}
46+
```
47+
48+
By default, this replaces the default classes on the td element, if you would like to keep them, set the default flag to true.
49+
50+
```php
51+
public function configure(): void
52+
{
53+
$this->setSecondaryHeaderTdAttributes(function(Column $column, $rows) {
54+
if ($column->isField('id')) {
55+
return [
56+
'default' => true,
57+
'class' => 'text-red-500'
58+
];
59+
}
60+
});
61+
}
62+
```

docs/usage/common-issues.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Common Issues
3+
weight: 4
4+
---
5+
6+
### Property Errors
7+
8+
The strong recommendation is to not publish the views for this package. The vast majority of elements can be customised using methods within the package.
9+
10+
See "Available Methods" in most sections for details, some examples:
11+
[DataTable Styling](../datatable/styling)
12+
[Bulk Actions Styling](../bulk-actions/styling)
13+
14+
### Previously Published Views
15+
16+
The strong recommendation is to not publish the views for this package. If you have published the views prior to v3.4.5, and do not wish to remove these, then you should add the following method, to disable the newer (more efficient) behaviour:
17+
18+
```php
19+
public function configure(): void
20+
{
21+
$this->useComputedPropertiesDisabled();
22+
}
23+
```

0 commit comments

Comments
 (0)