Open benallfree opened 6 months ago
i'm also need this feature! in logic that change looks like "simple dimple" change actions = actions(data); to actions = await actions(data); in the condition
// if action is a function, run it to get our array of actions
if (typeof actions === "function") {
actions = await actions(data);
}
if actions function is async then we wait, in another way nothing changed. yes, it can maybe be a little slowly, but is that really matter and if we have benchmarks we can check
Yep and it seems to work 100%!
@benallfree , you know what we should do for the next iteration of the implementation?
The PR is ready & awaiting approval. What do you mean next iteration?
This update makes it possible to use a dynamic actions function that returns a promise. It's helpful for situations where building the final actions list requires async calls.