SebboRR
Forcing blur() on form field before save in RelationManager (double-click issue)
Hi,
I'm having an issue with a form within a RelationManager in Filament v3. I'm using live(onBlur: true) on several form fields to dynamically recalculate values using afterStateUpdated and a custom calculator class.
The problem is that if the user edits a field and then directly clicks the "Save" button (without clicking outside the field, i.e., without triggering blur()), the form doesn't submit on the first click. Only the second click actually submits the form. This is because the first click triggers the recalculations, but the actual form submission only happens on the second click.
I'd like the form to submit on the first click, even if the user hasn't "blurred" the last edited field.
Is there an elegant way to programmatically force blur() on the active form field before the form is submitted in a RelationManager? I'm looking for a solution that is as aligned with the Filament philosophy as possible and doesn't require "dirty" DOM manipulation.
Is there a way to easily customize the attributes of the "Save" button within the form inside the RelationManager's modal/slide-over? If so, I could add the x-on:click directly to that button.
Alternatively, is there another recommended method for solving this problem?
Thanks in advance for your help!
2 replies
Request to Update Livewire Dependency to v3.5.13 (or later)
Hi Team,
I hope this message finds you well.
I noticed that the current version of filament/support (v3.2.133) requires livewire/livewire (v3.5.12) as a dependency. Unfortunately, there's a known issue in Livewire v3.5.12 that has been resolved in v3.5.13.
https://github.com/livewire/livewire/discussions/8941
https://github.com/livewire/livewire/discussions/9002
Would it be possible to update the dependency to allow for Livewire v3.5.13 (or later) in a future release of Filament? This would enable users to benefit from the fixes in the newer Livewire version while maintaining compatibility with Filament.
Thank you for all your hard work and for continually improving this amazing package!
Best regards,
3 replies
Windows 8.1 - UI only partially loads - ':popover-open' is not a valid selector
Environment
- OS: Windows 8.1
- Framework: Laravel11/Filament3
- Livewire version: 3
- PHP version: 8.3
- Browser: Chrome,Edge, Firefox
Symptoms
- UI only partially loads
- Menu links are not functional
- Interface stops loading halfway
Questions
1. Has anyone encountered similar issues with Filament on older systems?
2. Are there any known workarounds for the popover functionality in Windows 8.1?
3. Are there any configuration settings that could help bypass this problem?
Any help or guidance would be greatly appreciated. Thank you in advance!
---
Note: I understand Windows 8.1 is no longer supported, but upgrading the system is not an option in my current situation.
Error form browser console
popover.js:3
Uncaught (in promise) DOMException: Failed to execute 'querySelectorAll' on 'Element': ':popover-open' is not a valid selector.
at Wn (https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:85:79)
at https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:85:3547
at https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:11:38320
at NodeList.forEach (<anonymous>)
at Un (https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:11:38274)
at https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:85:3534
at ka (https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:85:4204)
at https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:85:3521
at G.<computed>.whenFinished (https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:11:37066)
at Mn (https://gmina-drobin.softpublica.pl/livewire/livewire.min.js?id=38dc8241:11:36836)
3 replies
How to GrpupBy and Sum in Widget Table.
I have widget table where I want sum some columns grouped by accoount_id and instrument_id
I don't know how to sum values like number, provision ...
->sum('number') // Dont work
I havean error:
Filament\Tables\Table::query(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder|Closure|null, int given, called in C:\laragon\www\inwestycje\app\Filament\Widgets\InstrumentsInAccouts.php on line 29
3 replies
How to change background color of sidebar
I wont to change the background color of the sidebar I found this description:
https://filamentphp.com/docs/3.x/support/style-customization
but I don't know where to put this code until it worked.
.fi-sidebar {
@apply bg-gray-50 dark:bg-gray-950;
}
5 replies