alternative to fillForm or change/edit value of form
Hello, in test is there another way than fillForm to change a value via form? because I realize that it does not change value, attached dd($data) mutateFormDataBeforeSave and it is maintaining status 1 should be 2
9 Replies
You need to use closures, so for example if you change a value you would use say:
->reactive()
->afterStateUpdated(fn($state, Closure $get, $set) => $set('a diffferent field name', 'new value, of say $state');
sorry I think I was not clear enough, I mean in the tests
if you see the capture you realized that I trying to test edit a resource
? @toeknee_iom
I'm not too sure, Dennis/Dan/Awo may have a better iidea
okthanks, can you tag them? please, because I don't know their usernames @toeknee_iom
@Dennis Koch or @Dan Harrin , I'm not sure on this one if you have an view
please open an issue with a minmal reproduction
if its a real bug, you wont have a problem. if its a user error, you wont be able to reproduce it
You added to array items instead of key => value:
fillForm(['buyer_status' => Order::PAGADO_COMPRADOR])
oh fuck damn 😅 you're right thanks!
good spot, i missed that too