Repeater add/remove item causes form re-render and js modified values reset to defaults
I have a js calculation in a filament form because I want to calculate without backend requests. I have repeater on the page and when I add/remove item from the repeater it triggers update request which re-renders the form and my js calculated values are gone.
Example:
I have 3 inputs (x,y,z) one of them (z) is disabled and is calculated via js. x*y=z
I want to save all 3 of them into the db.
If I change x or y I calculate the rezult and put the value into z.
Then when I add/remove repeater x and y stays as I changed them, but z gets the original value.
How I can prevent this and keep the js calculated value.
Filament v4
1 Reply
Please share some code