appsmithorg / appsmithorg/appsmith

[Feature]-[500]:Reactive Actions Setting, execute actions when dependencies change

Open
#2,639 6 comments 0 reactions 0 assignees View on GitHub
Enhancement Javascript Product JS Evaluation Medium Query & JS Pod Query Widgets & IDE Pod
Dominant language
TypeScript
Stars
40.9k
Forks
4.8k
Avg merge
1d 22h
Merged PRs (30d)
45

Description

## Description

We need a feature to allow the execution of actions whenever one of their dependent values changes. This will mean that an API / Query that reads a value from a widget or from another API/Query will be automatically re-run whenever the value of the Widget/API/Query changes. ex.
fetchUsersAPI
Body: {{Input1.text}}
This will call fetchUsers API whenever a user types a value in Input1
This feature should be an explicit setting that users must enable to begin with. If we see mass adoption and benefit here, we can introduce the logic to auto enable this for non-destructive actions the way we do for the onPageLoad setting

## Motivation
- This will make it easier for users to configure apps since it adheres more closely to the reactive paradigm and users now need only focus on the relationships between entities. We see this often where users configure pagination perfectly only to miss out on the last step i.e calling the API onPageChange. Related to #2086 and #2341
- This allows us to configure workflows where onPageLoad, we can call 1 API which fetches the list of users and another API to fetch the details of the first user in the table using the table's default selected row property. This is not possible today because the fetchDetails API is run before the table.selectedRow can be updated with the details of the fetchUsers API.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.