You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The form fields for a smart action should be pre-filled with the object returned by the ' values' method.
Actual behavior
These default values are ignored, the form fields are empty.
I tried also with this example from the documentation:
const liana = require('forest-express-sequelize');
liana.collection('Organization', {
actions: [
{
name: 'Charge credit card',
type: 'single',
fields: [
{
field: 'amount',
isRequired: true,
description: 'The amount (USD) to charge the credit card. Example: 42.50',
type: 'Number',
},
{
field: 'description',
isRequired: true,
description: 'Explain the reason why you want to charge manually the customer here',
type: 'String',
},
{
// we added a field to show the full potential of prefilled values in this example
field: 'stripe_id',
isRequired: true,
type: 'String',
},
],
// In values you define the appropriate prefilled value of each field
values: () => {
return {
amount: 4520,
stripe_id: 'blabla',
};
},
},
],
});
But it doesn't work either:
Failure Logs
no error log
Context
Created a project with forest-express-sequelize middleware.
Created a smart action with some fields default values computed with the 'values' syntax.
The same code worked a few months ago, maybe I am missing something.
Package Version: 5.0.0
Express Version: 4.17.1
Sequelize Version: 5.21.2
Database Dialect: postgres
Database Version: 10.9
The text was updated successfully, but these errors were encountered:
Expected behavior
The form fields for a smart action should be pre-filled with the object returned by the ' values' method.
Actual behavior
These default values are ignored, the form fields are empty.
I tried also with this example from the documentation:
But it doesn't work either:
Failure Logs
no error log
Context
Created a project with forest-express-sequelize middleware.
Created a smart action with some fields default values computed with the 'values' syntax.
The same code worked a few months ago, maybe I am missing something.
The text was updated successfully, but these errors were encountered: