@@ -89,20 +89,20 @@ public function hasCustomSortingPillDirections(): bool
8989        return  $ this sortingPillDirectionAsc  !== null  && $ this sortingPillDirectionDesc  !== null ;
9090    }
9191
92-     public  function  getCustomSortingPillDirections (string  $ directionstring 
92+     public  function  getCustomSortingPillDirections (string  $ direction, ? string   $ defaultLabelAsc  =  ' A-Z ' , ? string   $ defaultLabelDesc  =  ' Z-A ' string 
9393    {
9494        if  ($ direction'asc ' ) {
95-             return  $ this sortingPillDirectionAsc ;
95+             return  $ this sortingPillDirectionAsc  ??  $ defaultLabelAsc 
9696        }
9797
9898        if  ($ direction'desc ' ) {
99-             return  $ this sortingPillDirectionDesc ;
99+             return  $ this sortingPillDirectionDesc  ??  $ defaultLabelDesc 
100100        }
101101
102102        return  __ ('livewire-tables::not_applicable ' );
103103    }
104104
105-     public  function  getCustomSortingPillDirectionsLabel (string  $ directionstring  $ defaultLabelAsc,  string  $ defaultLabelDescstring 
105+     public  function  getCustomSortingPillDirectionsLabel (string  $ direction? string  $ defaultLabelAsc =  ' A-Z ' , ? string  $ defaultLabelDesc =  ' Z-A ' string 
106106    {
107107        if  ($ direction'asc ' ) {
108108            return  $ this sortingPillDirectionAsc  ?? $ defaultLabelAsc
@@ -118,13 +118,13 @@ public function getCustomSortingPillDirectionsLabel(string $direction, string $d
118118    public  function  getSortingPillDirection (DataTableComponent $ componentstring  $ directionstring 
119119    {
120120        if  ($ this hasCustomSortingPillDirections ()) {
121-             return  $ this getCustomSortingPillDirections ($ direction
121+             return  $ this getCustomSortingPillDirections ($ direction,  $ component -> getDefaultSortingLabelAsc (),  $ component -> getDefaultSortingLabelDesc () );
122122        }
123123
124124        return  $ direction'asc '  ? $ componentgetDefaultSortingLabelAsc () : $ componentgetDefaultSortingLabelDesc ();
125125    }
126126
127-     public  function  getSortingPillDirectionLabel (string  $ directionstring  $ defaultLabelAsc,  string  $ defaultLabelDescstring 
127+     public  function  getSortingPillDirectionLabel (string  $ direction? string  $ defaultLabelAsc =  ' A-Z ' , ? string  $ defaultLabelDesc =  ' Z-A ' string 
128128    {
129129        if  ($ this hasCustomSortingPillDirections ()) {
130130            return  $ this getCustomSortingPillDirectionsLabel ($ direction$ defaultLabelAsc$ defaultLabelDesc
0 commit comments