File tree Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,16 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
10
10
11
11
- Arabic translations
12
12
- Ability to add a link to make table rows clickable
13
+ - Added the ability to change the sort icons
13
14
14
15
### Updated
15
16
16
17
- Livewire to 2.x
17
18
19
+ ### Removed
20
+
21
+ - Removed 1 hard coded font awesome icon
22
+
18
23
### Changed
19
24
20
25
- Publish tags to service provider
Original file line number Diff line number Diff line change @@ -173,6 +173,9 @@ You can override any of these in your table component:
173
173
| -------- | ------- | ----- |
174
174
| $sortField | id | The initial field to be sorting by |
175
175
| $sortDirection | asc | The initial direction to sort |
176
+ | $sortDefaultClass | text-muted fas fa-sort | The default sort icon |
177
+ | $ascSortClass | fas fa-sort-up | The sort icon when currently sorting ascending |
178
+ | $descSortClass | fas fa-sort-down | The sort icon when currently sorting descending |
176
179
177
180
#### Pagination
178
181
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ class="{{ $this->setTableHeadClass($column->attribute) }}"
15
15
{{ $column -> text } }
16
16
17
17
@if ($sortField !== $column -> attribute )
18
- <i class =" text-muted fas fa-sort " ></i >
18
+ <i class =" {{ $sortDefaultClass } } " ></i >
19
19
@elseif ($sortDirection === ' asc' )
20
- <i class =" fas fa-sort-up " ></i >
20
+ <i class =" {{ $ascSortClass } } " ></i >
21
21
@else
22
- <i class =" fas fa-sort-down " ></i >
22
+ <i class =" {{ $descSortClass } } " ></i >
23
23
@endif
24
24
</span >
25
25
@else
Original file line number Diff line number Diff line change 2
2
<div class =" row" >
3
3
<div class =" col-12" >
4
4
<div wire:offline class =" alert alert-danger" >
5
- < i class = " fa fa-info-circle " ></ i > @lang (' laravel-livewire-tables::strings.offline' )
5
+ @lang (' laravel-livewire-tables::strings.offline' )
6
6
</div >
7
7
</div >
8
8
</div >
Original file line number Diff line number Diff line change @@ -25,6 +25,27 @@ trait Sorting
25
25
*/
26
26
public $ sortDirection = 'asc ' ;
27
27
28
+ /**
29
+ * The default sort icon
30
+ *
31
+ * @var string
32
+ */
33
+ public $ sortDefaultClass = 'text-muted fas fa-sort ' ;
34
+
35
+ /**
36
+ * The sort icon when currently sorting ascending
37
+ *
38
+ * @var string
39
+ */
40
+ public $ ascSortClass = 'fas fa-sort-up ' ;
41
+
42
+ /**
43
+ * The sort icon when currently sorting descending
44
+ *
45
+ * @var string
46
+ */
47
+ public $ descSortClass = 'fas fa-sort-down ' ;
48
+
28
49
/**
29
50
* @param $attribute
30
51
*/
You can’t perform that action at this time.
0 commit comments