Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language does not get passed for user actions when using CustomButton #2759

Open
ivarne opened this issue Nov 27, 2024 · 0 comments
Open

Language does not get passed for user actions when using CustomButton #2759

ivarne opened this issue Nov 27, 2024 · 0 comments
Labels
kind/bug Something isn't working status/triage

Comments

@ivarne
Copy link
Member

ivarne commented Nov 27, 2024

Description of the bug

doPerformAction wants a language parameter

export const doPerformAction = async (
partyId: string,
dataGuid: string,
data: unknown,
language?: string,
): Promise<ActionResult> => {
const response = await httpPost(getActionsUrl(partyId, dataGuid, language), undefined, data);
if (response.status !== 200) {
throw new Error('Failed to perform action');
}

But it is not set in CustomButtonComponent

return doPerformAction(partyId, instanceGuid, { action: action.id, buttonId });
},

Steps To Reproduce

  1. Create an app with a custom button that triggers an IUserAction that read UserActionContext.Language property
  2. Click the button and see that the property is null.

Additional Information

This issue replaces Altinn/app-lib-dotnet#927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
Status: 📈 Todo
Development

No branches or pull requests

1 participant