Marc
Refresh the form after saving in SPA mode
How can I refresh the form while in SPA mode after saving data?
I make the following modification before storing the value to the database:
But for some reason, after saving, the value remains the same as what the user has entered, you have to reload the page (F5) to show the real value.
A solution for this is:
But this presents another problem, if the user is editing the field and clicks on the save button, the data is not saved.
I suppose it is because he is making the AJAX call to afterStateUpdated and the save button is disabled even though it is not visible visually.
So, how can I recharge the state without having secondary problems?
10 replies
How to make a rule "in" of a multiple select
I have the following code:
When I submit the form I get the error:
The middlewares field is not in the list of allowed values.
In Laravel, to validate an array, you use middlewares.*
, but I don't know how to do it in filament13 replies
Unable to find component for relationship manager
I'm creating a relationship manager in a child panel, but when registering it I get this error Unable to find component: [app.filament.futbol.resources.club-resource.relation-managers.teams-relation-manager]
What do I have to do to solve it?
6 replies
How to create dynamic properties in macro using php8
I am trying to create dynamic properties using macro but I am getting the following warning from php8:
Investigating, you have to put AllowDynamicProperties in the class
But I'm doing the macro because I can't edit the TextInput class, is there a way to do this without having to create a new class that extends TextInput?
2 replies
How can I get the created model from createOptionForm?
I need to get the model that is created using createOptionForm(), I have tried using createOptionAction(), but I can't get the form.
So I have had to rewrite the action() to make it work, but I know it is not correct and I need to find an alternative to do this, does anyone have an idea?
I have tried to get the model from:
$component, $model, $record, $state
But none of these options work.
Another option that I have found is the following:
2 replies
expandableLimitedList without listWithLineBreaks
How can I use expandableLimitedList without using listWithLineBreaks.
When I put listWithLineBreaks, the data is displayed fine,
When I remove listWithLineBreaks, the see more message disappears and in the console I receive this error:
livewire.js?id=6b5eb707:1198 Alpine Expression Error: isLimited is not defined
Expression: "isLimited"
<button class="fi-link group/link relative inline-flex items-center justify-center outline-none fi-size-md fi-link-size-md gap-1.5 fi-color-gray" type="button" wire:loading.attr="disabled" x-on:click.prevent="isLimited = false" x-show="isLimited" style="display: none;">…</button>
2 replies
Unnecessary SQL in select filter using relations
I am using SelectFilter with preload, when the page loads the SQL is being executed, but the select does not show any data, so, every time you click on the select, it makes another call to the server and performs another SQL query, the same as the previous one.
Is there any way to avoid it?
20 replies
How to make js load fast?
It is a bit annoying to see how the native input is rendered first and then the styled input, it is more noticeable in the:
multiple select, toggle, file upload, and I haven't tried all the components yet.
I put an image in the following message
10 replies
Where do I have to put "Insert Livewire components into a form"
I am looking at the documentation, but this part does not say in which class it must be inserted and in what method
https://filamentphp.com/docs/3.x/forms/advanced#inserting-livewire-components-into-a-form
4 replies
Validation does not work
I have created a custom page, but the validation did not work, in "new_password" I put 123 and in "new_password_confirmation" 1234 and I do not get any validation errors, nor are the rules of "->rule()" being applied, this is the page code:
In blade file:
2 replies