I have five wire methods in my LWC.
And I want to execute one of them at first.
And only if this one is successfful - execute others.
Is there any way to tell my LWC Which wire method I want to execute as the first ?
Here some of my wire methods :
@wire(isUserLicenced, {userId : USER_ID}) // this one should be the first
isUserLicencedMethod({error,data}) {
if (error) {
console.error(error);
} else if (data) {
console.log('isUserSetupLicenced');
}
}
@wire(getPermissions)
getPermissionsData({ data, error }) {
if(data) {
console.log('getCustomPermissionsMapData');
} else if (error) {
console.error(error);
}
}
@wire(getCashDrawerOpenReasons)
setCashDrawerOpenReasons({error,data}) {
if(data) {
console.log('setCashDrawerOpenReasons');
} else if (error) {
console.error(error);
}
}
I saw this answer , However it did not help me!
Maybe someone has already done something similar ?
Any help will be appreciated.
thank you