Open nocodelab opened 1 year ago
I checked with others, and it appears there's a bug in async Alpine. @nocodelab
this is a bug in async alpine. the PR was just merged and released. will update filament as soon as possible.
I checked with others, and it appears there's a bug in async Alpine. @nocodelab
this is a bug in async alpine. the PR was just merged and released. will update filament as soon as possible.
that's great! thanks @CodeWithDennis!
It looks like the issue isn't solved in the latest Filament release. I'll need to investigate more and might ask for assistance.
Maybe it's related to the wire:key assignment. I saw here https://github.com/CodeWithDennis/filament-select-tree/blob/3.x/resources/views/select-tree.blade.php that you are assigning a rand() value. How come? Maybe that breaks after the reorder...
Maybe it's related to the wire:key assignment. I saw here https://github.com/CodeWithDennis/filament-select-tree/blob/3.x/resources/views/select-tree.blade.php that you are assigning a rand() value. How come? Maybe that breaks after the reorder...
Yes, this creates problems, but without it, the field won't be reactive/live. So, we have to find a better solution.
Why is the field not reactive/live without setting the wire:key
to rand()
?
Why is the field not reactive/live without setting the
wire:key
torand()
?
Adding wire:key also makes the field flicker. So, we gotta figure out a better way to fix this. Without the wire:key
the field won't be disabled.
(Removing the wire:key doesn't solve this issue BTW)
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
->live(),
SelectTree::make('categories')
->placeholder(__('Select categories'))
->label(__('Categories'))
->relationship('categories', 'name', 'parent_id')
->enableBranchNode()
->disabled(fn(Forms\Get $get) => filled($get('name'))),
])->columns(1);
}
@nocodelab any update on this one? did you fix your problem?
Nope, I just switched to normal select inputs…Giuseppe M.Sent from my iPhone 📱 / Excuse my brevityOn 16 Apr 2024, at 13:44, Chandra Aulia Tama @.***> wrote: @nocodelab any update on this one? did you fix your problem?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
What happened?
When the SelectTree field is used within a sortable Repeater a duplication behaviour happens. Have a look at the video attached:
https://github.com/CodeWithDennis/filament-select-tree/assets/4540118/e4de4930-f73a-420e-8133-a81a3c7198d8
How to reproduce the bug
Simply use the SelectTree field in any repeater.
Package Version
3.1
PHP Version
8.2
Laravel Version
10
Which operating systems does with happen with?
No response
Notes
No response