diff --git a/config/livewire-tables.php b/config/livewire-tables.php index c99a75aef..4cc3dccab 100644 --- a/config/livewire-tables.php +++ b/config/livewire-tables.php @@ -88,6 +88,7 @@ 'minRange' => 0, // The minimum possible value 'maxRange' => 100, // The maximum possible value 'suffix' => '', // A suffix to append to the values when displayed + 'prefix' => '', // A prefix to prepend to the values when displayed ], ], /** @@ -106,7 +107,7 @@ ], /** - * Configuration options for MultiSelectFilter + * Configuration options for MultiSelectDropdownFilter */ 'multiSelectDropdownFilter' => [ 'defaultOptions' => [], diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index ee6333ee6..184f71cd0 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -70,11 +70,11 @@ class="d-flex align-items-center" @if ($direction === 'asc') - + @elseif ($direction === 'desc') - + @else - + @endif diff --git a/resources/views/components/tools/filters/number-range.blade.php b/resources/views/components/tools/filters/number-range.blade.php index 8fe85bf06..b04ae3c5a 100644 --- a/resources/views/components/tools/filters/number-range.blade.php +++ b/resources/views/components/tools/filters/number-range.blade.php @@ -2,7 +2,8 @@ $filterKey = $filter->getKey(); $currentMin = $minRange = $filter->getConfig('minRange'); $currentMax = $maxRange = $filter->getConfig('maxRange'); - $suffix = $filter->getConfig('suffix'); + $suffix = $filter->hasConfig('suffix') ? '--suffix:"'. $filter->getConfig('suffix') .'";' : ''; + $prefix = $filter->hasConfig('prefix') ? '--prefix:"'.$filter->getConfig('prefix').'";' : ''; @endphp
@@ -19,7 +20,7 @@ 'range-slider flat' => $isTailwind, 'range-slider flat w-100' => $isBootstrap, ]) - style=' --min:{{ $minRange }}; --max:{{ $maxRange }}; --suffix:"{{ $suffix }}";' + style=' --min:{{ $minRange }}; --max:{{ $maxRange }}; {{ $suffix . $prefix }}' >
- \ No newline at end of file +