Hey @Bubble: You know what we be really useful? If triggered events could have an accompanying value.
The way the plugin APIs are right now is backward: The Bubble programmer user can send us (the plugin) a value (or values), but we cannot respond in kind. triggerEvent() could really use an argument (or array of arguments) . Like:
triggerEvent(‘event_name’, value, callback())
… instead of how it is now:
I GET that the Bubble programmer user can, upon receiving an event, inspect the value of an exposed state. However, that state can easily be gone or changed by the time all of that happens.
Also, such a feature would enable iteration in the browser. Let us say that I build a date picker that exposes a list of dates. Now, the client user has selected dates and Bubble programmer user needs to iterate over them. Bubble user could send initiate an Action such that we (the plugin) can respond immediately with a barrage of events and accompanying values.
In this example, respond with triggerEventI(“doSomething", date1, some_callback(which_we_prolly_no_longe_need)) followed by triggers accompanied by date2…daten and thereby enable safe, client-side iteration.
We need this. (Well, those of us building bare-metal Bubble plugins DESIGNED FOR BUBBLE and not just adapting libraries or doing no-op functions.)
(If i’m being derpy and this is already available do let me know. But I’m pretty sure this is something the plugin API does not enable, ATM.)