Skip to content

Commit

Permalink
fix: change optionAction to optionEvents (#485)
Browse files Browse the repository at this point in the history
Co-authored-by: michel <[email protected]>
  • Loading branch information
M-Ryan92 and michel authored Jan 21, 2025
1 parent a35700f commit fadcc03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/validations/prefab/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ const onChangeAction = Joi.object({
target: Joi.string(),
});

const optionActionsObject = Joi.object({
onChange: Joi.array().items(onChangeAction),
const optionEventRecord = Joi.object({
onChange: Joi.object().pattern(
Joi.string(),
Joi.array().items(onChangeAction),
),
});

const optionTemplatesSchema = (availableComponentNames?: string[]) =>
Expand All @@ -228,7 +231,7 @@ const optionTemplatesSchema = (availableComponentNames?: string[]) =>
),
}),
options: Joi.array().items(optionSchema).required(),
optionActions: Joi.object().pattern(Joi.string(), optionActionsObject),
optionEvents: optionEventRecord,
}),
});

Expand Down

0 comments on commit fadcc03

Please sign in to comment.