📄️ Concept
The AccessoryForm displays the user interface for the accessory selection. It provides a list of accessories, that can include input fields and sliders that allow users to configure their accessories and include it into the calculation request. This form is dynamically generated based on UIControls, which have to be fetched from Kampmanns backend.
📄️ UIControls
This section will guide you through the process of fetching the UI Controls from the backend and using them in the AccessoryForm component.
📄️ Callback
The Callback prop is a function called whenever the user changes any form values in the AccessoryForm component. The Callback function receives an object containing the accessories request data, which can be used to add an accessories array to the calculation request that will be send to the backend.
📄️ initState
The callback arrays can be persisted in a data storage (database, local storage, ...) and inserted to the corresponding initCalculableAccessories and initNonCalculableAccessories props when the AccessoryForm component is initialized.
📄️ Config
The same config parameter as in the CalcGatewayForm component is available in the AccessoryForm too. Information can be found here.