From 0753dd44abf69048726fa024e198d36074de1ce5 Mon Sep 17 00:00:00 2001 From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com> Date: Sun, 4 May 2025 11:26:49 +0200 Subject: [PATCH] add options and context to AttributeChoiceField --- src/main.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.mjs b/src/main.mjs index aedcd0d..d965ed6 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -272,7 +272,7 @@ class AttributeField extends SchemaField { } class AttributeChoiceField extends StringField { - constructor() { + constructor(options={}, context={}) { return super({ required: true, choices: { @@ -286,7 +286,8 @@ class AttributeChoiceField extends StringField { "strength": "DSA41.attributes.long.strength", }, initial: "courage", - }); + ...options, + }, context); } }