Not sure if this is a feature request or a bug
Feature(s) impacted
Smart Actions with no fields that use load hooks.
Observed behavior
If a smart action with no initial fields is triggered then a form will not appear.
Expected behavior
I expect that if fields are added using load hooks, then a smart action form will still appear with the newly loaded fields.
Example code
As you can see in the example code you would start with an empty fields array, and we would ideally like to dynamically add fields to the smart action form. While we do appreciate that the form is skipped when there are no fields. I guess ideally the load hook should occur before determing whether the form should be skipped or not.
{
name: "Smart Action",
download: true,
fields: [],
hooks: {
load: ({ fields, request }) => {
const field: Liana.SmartActionLoadHookField = {
field: `custom field name`,
type: "String",
position: 0,
widget: "text area",
value: `custom value`,
};
fields.push(field);
return fields;
},
change: {},
},
}
Context
- Project name: Bridgement
- Team name: Bridgement
- Environment name: Production
- Agent type & version: forest-express-sequelize: v8.4.10