-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Describe the bug
Widget's onLoad Action can't access storage-bound inputs
To Reproduce
Widgets with inputs bound to ensemble.storage.get()
experience a race condition where the onLoad
action is executed before storage is properly hydrated, causing inputs to be unevaluated in the onLoad
action.
Example Scenario
# Screen using TasksGrid widget
View:
body:
TasksGrid:
inputs:
userFilters: ${ensemble.storage.get('userFilters') ?? {}}
# TasksGrid widget definition
Widget:
inputs:
- userFilters
onLoad:
executeCode: |
console.log(userFilters); // Always logged {} instead of actual storage data
// Any logic depending on userFilters would fail
body:
Text:
text: ${userFilters.status} # This works (more info below)
Expected behavior
Storage-Bound Inputs of a widget are evaluated when onLoad action is executed.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.