diff --git a/src/components/FormBuilder/fields/CheckboxField.tsx b/src/components/FormBuilder/fields/CheckboxField.tsx index f7eb022..d1ad1d0 100644 --- a/src/components/FormBuilder/fields/CheckboxField.tsx +++ b/src/components/FormBuilder/fields/CheckboxField.tsx @@ -9,6 +9,7 @@ import { } from "#/components/ui/Form"; import { BaseField, withConditional } from "../fields"; +import isFieldDisabled from "../isFieldDisabled"; export interface CheckboxFieldProps extends BaseField { type: "checkbox"; @@ -31,6 +32,7 @@ export const CheckboxField = withConditional(
diff --git a/src/components/FormBuilder/fields/DatePickerInput.tsx b/src/components/FormBuilder/fields/DatePickerInput.tsx index 38caa3c..c688e9d 100644 --- a/src/components/FormBuilder/fields/DatePickerInput.tsx +++ b/src/components/FormBuilder/fields/DatePickerInput.tsx @@ -34,6 +34,7 @@ export const DatePickerInput = withConditional( control={form.control} name={field.name} rules={field.required ? { required: true } : undefined} + defaultValue={field.defaultValue} render={({ field: formField }) => ( {field.label} diff --git a/src/components/FormBuilder/fields/FieldArray.tsx b/src/components/FormBuilder/fields/FieldArray.tsx index 3818d44..8350fdb 100644 --- a/src/components/FormBuilder/fields/FieldArray.tsx +++ b/src/components/FormBuilder/fields/FieldArray.tsx @@ -125,8 +125,7 @@ export const FieldArray = withConditional(
    - {/* eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars */} - {(provided, snapshot) => ( + {(provided) => (
    {fields.map((rhfField, index) => { // @ts-expect-error @@ -139,11 +138,10 @@ export const FieldArray = withConditional( draggableId={`item-${index}`} index={index} > - {/* eslint-disable-next-line no-shadow, @typescript-eslint/no-unused-vars */} - {(provided, snapshot) => ( + {(innerProvided) => (
  • ( {field.hasSequence && (
    @@ -167,6 +165,7 @@ export const FieldArray = withConditional( // eslint-disable-next-line jsx-a11y/control-has-associated-label