-
-
Notifications
You must be signed in to change notification settings - Fork 42
[Bug]: Sometimes not SelectTree render correctly #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you check if |
Yes, disable spa() not more problems, but spa is good for performance and user experience? |
I agree! I was just wondering if that was the issue. My knowledge on this problem is limited, so I’m not sure how to fix it. Maybe I could ask for some help on this. |
Also spa() disable here fixes this on my end - recent filament (3.2.141?) and php 8.3.x can't find a root issue but will try to look this weekend. |
Also having the same issue. I have disabled the spa() option on my panel provider and it is working. Anyone found a solution to this while keeping the spa() enabled? |
This can be added to your FilamentServiceProvider to disable SPA for specific pages while keeping it enabled for others. ->spaUrlExceptions(fn(): array => [
'*/admin/products/*',
]) |
Introduce a `treeKey` property and associated methods to allow customization of the tree identifier. Updated Blade template to use the specified tree key for the `wire:key` attribute to ensure predictable component rendering. This is to address issue CodeWithDennis#141.
@CodeWithDennis - provided a patch that's working for me. I was seeing that even if it would render 'correctly', rerendering after some update would cause it to be hidden. The 'rand' are a wire:key seemed off to me. Putting in a definable key that remains the same throughout rerenders has fixed this for me. Hopefully this is a 'correct' patch and will work for others too. EDIT: it doesn't solve the initial render issue with spa mode on. But the spaURLException stuff doesn't seem like it's being called (see other comment). The PR fix addresses a related issue I was seeing, where after interacting with the select tree (removing a selected option, for example) it would disappear (as in the images provided). |
The 'FilamentView::hasSpaMode()' isn't calling anything that can use the spaURLExceptions, it seems. A bit hard to follow, but I see two hasSpaMode() calls in filament framework. The one that checks for spaUrlExceptions needs a url to be passed in to it, which the select-tree.blade.php isn't doing. EDIT: added patch for that in the same PR |
I've installed the latest patch #154 , but I'm still experiencing the SPA rendering issue. @mgkimsal @CodeWithDennis Is there anything I might be missing? SelectTree::make('parent_child_category')
->relationship('category', 'name', 'parent_id'), |
@AsmitNepali can you confirm is this patch #157 fixes your issue? |
Could you check this @AsmitNepali ? |
@CodeWithDennis @smiliyas Thank you! It looks like that fixed the issue. |
Perfect, im gonna do some checks this week and will release it somewhere this week. - @AsmitNepali @smiliyas |
What happened?
Sometime with no errors on console, SelectTree is not correctly rendered. If i reload page always is correctly rendered.
How to reproduce the bug
I can't reproduce it.
Package Version
3.1.45
PHP Version
8.3.16
Laravel Version
11.42.1
Which operating systems does with happen with?
macOS
Notes
Filament version 3.2.140
The text was updated successfully, but these errors were encountered: