When using a dynamic action dialog, it'd be helpful if the selected action index would also be returned
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hey, @jrz, indeed the promise returns only the selected action, but you can easily implement your own logic to know the index of the selected action (for example by using an identical array to get the index).
Hi! Yes, that's what I'm doing right now:
action(options).then((result) => {
let found = actions.find((a) => { return a.name == result });
});
I just though it'd be nice to have the index or id too. For translated labels it might be a pain. Although duplicate action labels should never happen ux-wise
Hey @jrz the solution you are using is easy enough to implement, so I think this is not a must-have feature.
However, NativeScript is an open source framework, and community contributors are more than welcome!
Anyone interested in this feature can create a PR following the contributing guidelines here
Most helpful comment
Hi! Yes, that's what I'm doing right now:
I just though it'd be nice to have the index or id too. For translated labels it might be a pain. Although duplicate action labels should never happen ux-wise