Toggle reverting to previous value on save
I have a toggle:
When I change it and click save on the resource, it says it saves succesfully, but then reverts back to it's original value. After refreshing the page it's value is updated. How do I ensure that changing the value and clicking save doesn't lose the updated value?
10 Replies
I've tried both live() and reactive() to see if that would have any effect, but it didn't work.
Are you using the panel builder? Any console error?
This is on a Resource class. There are no errors in the console.
seeing the same thing with a Select on the same page.
Hum.. did you try it in another resource?
no, not yet.
Are you trying it on the Edit page, right?
yep
default isn't applied because it is disabled on the create page
I took off both the disabledOn and default modifiers and it is behaving the same way.
I'm just going to get rid of the toggle. I already have a delete button, so it's kind of duplicative anyway.
I don't know why it is reverting to the previous value... you could try it in another resource..