I think I’ve read everything there is about clearing a custom state.
I’ve read to set the state and leave it blank and it will empty it. It does not.
I’ve read to just leave a space and it doesn’t work.
I think there should just be a ‘clear’ for the custom state.
So, maybe I’m overthinking this…
but can someone tell me how to clear a custom state?
I have a create a listing page and edit page and I need to clear the custom state after the listing is created or edited so when the next listing is created or edited it won’t still show the contents of the current state from before.
the issue is that you’ve got a default in the state…
this catches me all the time. if you set a default in the state then when you “clear it” it refills it with the default which means that you can’t ever clear it
if you need a default then push it into the state on page load or button click. I never use state defaults due to this issue of not being able to clear them
the same is not true for fields… it’s one of those “bubble logic quirks” that doesn’t make any sense
Actually, I have ‘on page load’ and I set the custom state.
Is that considered a default value?
I tried everything to clear it and then discovered the :minus list which is working.
Added: As far as leaving the state blank to clear it, it didn’t work. I also came across a couple of posts on the forum that said they had the same problem with just leaving it blank.