@planning-inspectorate/dynamic-forms 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/section.js +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planning-inspectorate/dynamic-forms",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "This package is for building GDS forms using a configuration-based approach.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/section.js CHANGED
@@ -5,7 +5,6 @@
5
5
  */
6
6
 
7
7
  import RequiredValidator from './validator/required-validator.js';
8
- import MultiFieldInputQuestion from './components/multi-field-input/question.js';
9
8
 
10
9
  /**
11
10
  * Defines a section for a questionnaire, a set of Questions
@@ -200,7 +199,7 @@ export class Section {
200
199
  continue;
201
200
  }
202
201
  // if question is a multi field input question, check all fields
203
- if (question instanceof MultiFieldInputQuestion) {
202
+ if (question.inputFields) {
204
203
  for (const field of question.inputFields) {
205
204
  if (question.fieldIsRequired(field.fieldName)) {
206
205
  requiredQuestionCount++;