rappasoft/laravel-livewire-tables

[Bug]: Extra @endphp in DateRangeFilter blade

Traqza opened this issue · 6 comments

Traqza commented

What happened?

When using this filter I get a @endphp tag, and out of scope view for the filter menu.

image

I can tab through and locate them, but the icon overtakes.

How to reproduce the bug

DateRangeFilter::make('Date Range')
->config([
'allowInput' => true, // Allow manual input of dates
'altFormat' => 'Y/m/d', // Date format that will be displayed once selected
'ariaDateFormat' => 'Y/m/d', // An aria-friendly date format
'dateFormat' => 'Y/m/d', // Date format that will be received by the filter
'earliestDate' => '2020/01/01', // The earliest acceptable date
'latestDate' => Carbon::now()->format('Y/m/d'), // The latest acceptable date
])
->setFilterPillValues([0 => 'minDate', 1 => 'maxDate']) // The values that will be displayed for the Min/Max Date Values
->filter(function (Builder $builder, array $dateRange) { // Expects an array.
$builder
->whereDate('start_timestamp', '>=', $dateRange['minDate']) // minDate is the start date selected
->whereDate('end_timestamp', '<=', $dateRange['maxDate']); // maxDate is the end date selected
}),

Package Version

v3.0.0-beta.1

PHP Version

None

Laravel Version

10.12.0

Alpine Version

No response

Theme

Bootstrap 5.x

Notes

No response

Error Message

No response

lrljoe commented

Thanks. Not sure how this one worked its way back in as did address it before.

Will fix this evening.

lrljoe commented

#1394 should fix this, will be in v3-develop shortly, tested briefly, then moved across and hopefully into a v3.0.0-beta.2 tomorrow.

lrljoe commented

This is in v3-develop now., and will go through the pipeline into v3-master, then a release.

Hoping to group any other bugs highlighted and do one release tomorrow to address those other items.

#1394 I tried the solution in this pull request on my published view, the @endphp is missing, but it still has bugs:

  1. The hero icon is still large.
  2. When clicking the date range input, the filter list is closed

Edit :

  • Just tried on v3-develop, its same
  • I think this issed need to be reopen #1342

here is the screenshot :
CleanShot 2023-10-07 at 04 05 38@2x

CleanShot 2023-10-07 at 04 09 02@2x

lrljoe commented

Will give it another test in bootstrap 5, can you confirm the exact bootstrap 5 version you are using please so that I can match precisely

lrljoe commented

This is in beta 3 I believe!