I use this in a custom package that I have on a site and so obviously I need to fix this before I can upgrade to U17. I’ve searched the docs and poked around the source but I what would have been nice is, since this is a breaking change maybe provide examples on how to fix the breaking change (I might have missed this somewhere).
I know U17 is only out today but just wondering if anyone has had the same issue and found a way to use the new dropdown menu instead of the old way?
I assume you used this Context to get the entityType or unique?
You can get these via arguments parsed to your Action API.
We base our actions on this Abstract Class: UmbEntityActionBase. With it, your code could look like this:
export class MyCustomEntityAction extends UmbEntityActionBase<never> {
override async execute() {
if (!this.args.unique) throw new Error('Cannot performe custom? action for an item without a unique identifier.');
console.log("custom action for " + this.args.unique)
}
}
The new, alternative way to get these values via Context, is via UMB_ENTITY_CONTEXT, which is more generic, also available in other places. — But as you get these values as args, then no reason to consume a context for this.
I hope that will work for you. Sorry for the inconvenience.