Open nkylstad opened 1 week ago
Functionality-wise this is quite similar to tableColumns
setting in subform. Suggest design to match.
I got some questions🤓
If a button is required to be added when adding a subform component, maybe it should be automatically added to the structure column, below the subform component? (Similar to what we have done with the navigation button when adding a page.)
In future iterations of the functionality, we might automatically configure the CustomButton to match the subform component it is associated with. Specifically, the idea is for the button to automatically use the same subform layoutset that is already set in the subform component.
Also, will this suggestions it be confusing if the button could be used in contexts other than in a subform? Do we have any need for a CustomButton in other cases today? And what is the difference between this and the one called "Handlingsknapp" in Studio today?
We can add the config as a Switch at the top of a SubForm page. Let the user see a text with information about what happens when adding this button. The switch design can be similar to the PDF switch. This switch adds the component to the list, and the user must be able to define the text on this. We should also have a default text initially on the button. If button is deleted from component list, turn switch off.
Could be placed here:
Take this out of sprint. New issue estimation: 3
Utilizing custom button for the isolated context with subform: https://github.com/Altinn/altinn-studio/issues/13836
Description
Setting up a CustomButton with actions is required for a subform layoutset. The action must be a
closeSubform
action. See reference docs.We currently have no support for actions config for the CustomButton component. We should implement a custom config for this property.
There are 2 types of actions:
actions
is an array of objects. The items in the array all have the propertiesid: string
- the id of the actiontype: "ClientAction" | "ServerAction"
.In addition, items with type "ClientAction" may also have additional properties. See the documentation for CustomButton for details.
Additional Information
One alternative we might consider in the short run is to implement a "CloseSubformButton" which is a specific implementation of the CustomButton:
and make this available as a pre-configured component.
Tasks
No response
Acceptance Criterias
No response