Support array of events for rule conditions
mavarazy opened this issue · 0 comments
mavarazy commented
We currently trigger a single event per rule, we need to support arrays of events to allow complicated triggers on the same condition.
For example, if we want to remove a field and change class name for the field under the same condition, currently we would need to do following:
[{
{
conditions: {
firstName: "empty",
},
event: {
type: "remove",
params: { field: "email" },
},
},
{
conditions: {
firstName: "empty",
},
event: {
type: "uiAppend",
params: { lastName: { classNames: "danger" } },
},
}
}]
While what we want to do is this:
{
conditions: {
firstName: "empty",
},
event: [{
type: "remove",
params: { field: "email" },
}, {
type: "uiAppend",
params: { lastName: { classNames: "danger" } },
}]
}