Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Add metadata field to serverActions for CustomButton-component #2728

Open MartinRoberg opened 6 days ago

MartinRoberg commented 6 days ago

Description

The Custombutton-component supports adding custom actions through server actions, by sending data about itself and the action id to the backend server. The button can send metadata to the backend which can be accesed through the action context. Currently the only action that supports adding metadata in the app config is the NavigateToPageAction, which is a predefined client-action.

Adding the metadata property to the config of custom server-actions, would allow more freedom and configurability for custom server actions than is currently possible. The metadata for a server-action can currently be only sent through the datamodel, but this way requires more complexity and components to work, instead of just the custombutton-component

Additional Information

No response