You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a page with 1 form that shows 1 of 2 action buttons depending on the current state
myForm(Form $form)
link(Request $request)
unlink(Request $request)
On first load, if currently unlinked, the link action is displayed and the dropdown is enabled
On first load, if currently linked, the unlink action is displayed and the dropdown is disabled
When I click link, this happens: updatedInteractsWithForms -> myForm -> link
When I click unlink, this happens: unlink -> myForm
The undesired behavior happens in 3, where the dropdown is not disabled after clicking on link, this is because myForm runs first before link and so it did not disable the dropdown because there is no link yet.
From my tracing, updatedInteractsWithForms occurs because there were changes made to the form. But in 2 where the dropdown is disabled, it is impossible to make any changes, and somehow filament decided to call the action unlink first before myForm.
How can I make my action always run beforemyForm like in 4?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Package
Form builder
Package Version
3.2.131
How can we help you?
I have a page with 1 form that shows 1 of 2 action buttons depending on the current state
myForm(Form $form)
link(Request $request)
unlink(Request $request)
link
action is displayed and the dropdown is enabledunlink
action is displayed and the dropdown is disabledlink
, this happens:updatedInteractsWithForms
->myForm
->link
unlink
, this happens:unlink
->myForm
The undesired behavior happens in 3, where the dropdown is not disabled after clicking on
link
, this is becausemyForm
runs first beforelink
and so it did not disable the dropdown because there is no link yet.From my tracing,
updatedInteractsWithForms
occurs because there were changes made to the form. But in 2 where the dropdown is disabled, it is impossible to make any changes, and somehow filament decided to call the actionunlink
first beforemyForm
.How can I make my action always run before
myForm
like in 4?Beta Was this translation helpful? Give feedback.
All reactions