Hello,
After installing the aforementioned plugin either through migration or programatically through a script, we have faced an issue when n trying to update one of its field programatically.
The plugin contains two fields:
- Fields to be show (which is a multiselect dropdown)
- Invert (which is a boolean toggle)
The issue arises with the first field when using the api to update the value of targetFieldsApiKey
through a migration of using content management api from a script, and the problem is that the updated value never shows in the UI select field.
Even when we are console logging the properties of the field, we can see that the array of targetFieldsApiKey
contains our desired value.
Manually of course it works fine
Could you please help us out to figure out what is the issue ?
const plugins = await client.plugins.all();
const {id} = plugins.find((plugin) => plugin.name === "Conditional fields")
const fieldIdOrApiKey = 'page::hide_navigation';
await client.field.update(fieldIdOrApiKey, {
appearance: {
editor: 'boolean',
parameters: {},
addons: [
{
id: id,
fieldExtension: "conditionalFields",
parameters: { invert: false, targetFieldsApiKey: ["banner_text"] }
}
]
},
});
Many thanks in advance
We noticed that there is also an open github issue