I am new to strapi and trying to create a custom component to render some HTML check-boxes based on an API response from another system. Basically the list of check-boxes will be added to a form (which is another strapi component). So far what I've done is
- Added a Strapi plugin based on this document: https://strapi.io/blog/how-to-create-a-strapi-v4-plugin
- Added a react component within the plugin (
/src/plugins/CheckboxList/admin/src/components/CheckboxList). Though the end goal is to get the check box list, for test purpose a text input field is added. - Registered the component with
app.addFields([
{
type: "checkbox_list",
Component: CheckboxList,
},
]);
method in (/src/plugins/CheckboxList/admin/src/index.js)
- Added the component in an existing component called
fieldby the following snippet:
// in field.json
"checkbox_list": {
"type": "checkbox_list",
"columnType": "longText"
}
Currently the text box is visible in Collection from content manager on strapi admin and also based on my inspection the updated data in the text box is also passed to the react props. However, I don't the see the data is getting saved in the strapi platform. Am I missing something or doing something wrong? or Its not really possible to create a custom component in strapi v4 that inserts data in custom fields?
Need help on this. Thanks in advance.