Forum Academy Marketplace Showcase Pricing Features

Add "When Custom State's Value is Changed" event

When building a single page application, we rely on custom states a lot to create the inner “screen” navigation. With multi-page apps, you can use the “when page is loaded” event to run actions that might be needed to set defaults or initial states of various things.

With SPAs, we have to get a bit more creative to do the same kind of “start of screen” for every screen change since “when page is loaded” only works literally when the page is first loaded. It would be really nice to have a workflow event for “When custom state’s value is changed.” This could help us create the equivalent of “when page is loaded” for SPAs when used in this context. I’m sure there could be other great uses for “When custom state’s value is changed” too.

For example, I’m working on a SPA that has a lot of inner screens, and we want the user to be scrolled to the top every time they change views (which are managed by a custom state). Instead of having to add a “Scroll to page” action for the dozens of different events that change the custom state (ie screen view), it would be great to have a single “When custom state’s value is changed” to run that scroll to top action.

I’m sure there are other use cases, but this is one I’ve run into a few times across multiple apps.

22 Likes

Oops, I should have checked before I posted, but this has been suggested before by @sridharan.s : Idea: Enable triggering workflows based on a change to a custom states' value

Seems like a great idea to me! :slight_smile:

1 Like

This would be a big time-saver :slight_smile:

*Edit: I didn’t realize Scott’s original post had the when an input’s value is changed workaround!

Yes, this is desperately needed!

1 Like

That would be so useful!

Agreed, would be very nice to see this feature come to life.

Hey guys! Did anyone figure a way to do this? @romanmg @philnauta @fayewatson @sridharan.s @luke2

1 Like

Also, on a similar note, is there a git issue tracker or something where Bubble shares the issues that are prioritized? I would like to see the feature requested by OP, but I would judge whether to wait, use a plugin, or some other alternative, if I knew roughly when it was going to be in the pipeline.

Loving Bubble overall though, I’m previously a React and mobile dev, but am able to fully embrace no-code now because of this! Keep on pushing forward, team :slightly_smiling_face:

I confirm, “Do when a custom state value changes” would be very useful !

This would be a fantastic addition to bubble! It would allow for more functionality with reuseable elements.