[Bug]: Card Break when drag to other status
putrafajarh opened this issue · 4 comments
What happened?
When i drag to other status or edit modal, the view break, but the functionality okay
already npm run dev
Did i miss something?
How to reproduce the bug
<?php
namespace App\Filament\Pages;
use Mokhosh\FilamentKanban\Pages\KanbanBoard;
use App\Models\Lead;
use App\Models\Funnel;
use Illuminate\Support\Collection;
use Filament\Forms;
class DentalKanbanBoard extends KanbanBoard
{
protected static string $model = Lead::class;
// protected static string $statusEnum = ModelStatus::class;
protected static string $recordTitleAttribute = 'sales_id';
protected static string $recordStatusAttribute = 'funnel_id';
protected function statuses(): Collection
{
$funnels = Funnel::where('division_id', 1)->get();
return $funnels->map(function ($funnel) {
return [
'id' => $funnel->id,
'title' => $funnel->title,
];
});
}
protected function getEditModalFormSchema(?int $recordId): array
{
return [
Forms\Components\TextInput::make('sales_id')->required(),
];
}
}
Package Version
^2.7
PHP Version
8.2
Laravel Version
10
Which operating systems does with happen with?
macOS
Which browsers does with happen with?
No response
Notes
No response
I copy/pasted your code and tried to recreate missing parts by guessing, and it worked without any issues.
Can you create a reproduction repository so I can see your issue? Or maybe provide more info?
it's really weird,
somehow this <
operator breaks the laravel blade,
I just try with simple logic @if(1 < 3)
when i try to move ur logic from
@if($record->timestamps && now()->diffInSeconds($record->{$record::UPDATED_AT}) < 3)
to
@if($record->timestamps && 3 > now()->diffInSeconds($record->{$record::UPDATED_AT}))
now it works really well..
huh. maybe looking at the generated php view could help us track down the bug.
or maybe something else specific to your code makes this happen cause it seems to be working fine in my apps.
i would still appreciate a reproduction repo.
Sorry @mokhosh, i cant reproduce it too with fresh install,
I think its a problem with my project, and it is not a bug for this filament-kanban