Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
onNextPage?: (page: number, submission: Submission) => void;
onCancelSubmit?: () => void;
onCancelComponent?: (component: Component) => void;
onChange?: (value: any, flags: any, modified: boolean) => void;

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 62 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
onCustomEvent?: (event: {
type: string;
component: Component;
Expand All @@ -69,17 +69,17 @@
onComponentChange?: (changed: {
instance: Webform;
component: Component;
value: any;

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 72 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
flags: any;

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 73 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
}) => void;
onSubmit?: (submission: Submission, saved?: boolean) => void;
onSubmitDone?: (submission: Submission) => void;
onSubmitError?: (error: EventError) => void;
onFormLoad?: (form: JSON) => void;
onError?: (error: EventError | false) => void;
onRender?: (param: any) => void;

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 80 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
onAttach?: (param: any) => void;

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 81 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
onBuild?: (param: any) => void;

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 82 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
onFocus?: (instance: Webform) => void;
onBlur?: (instance: Webform) => void;
onInitialized?: () => void;
Expand All @@ -91,7 +91,7 @@
onSubmissionDeleted?: (submission: Submission) => void;
onRequestDone?: () => void;
otherEvents?: {
[event: string]: (...args: any[]) => void;

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 94 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
};
};

Expand All @@ -114,7 +114,7 @@
| 'formioform'
| 'Formio'
>,
...args: [string, ...any[]]

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 117 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
) => {
const [event, ...outputArgs] = args;
if (event.startsWith('formio.')) {
Expand Down Expand Up @@ -319,7 +319,12 @@
if (formReadyCallback) {
formReadyCallback(instance);
}
setFormInstance(instance);
setFormInstance((prevInstance: any) => {
if (prevInstance) {
prevInstance.destroy(true);

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / setup

Unexpected any. Specify a different type

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / publish

Unexpected any. Specify a different type

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type

Check warning on line 324 in src/components/Form.tsx

View workflow job for this annotation

GitHub Actions / sync-to-monorepo

Unexpected any. Specify a different type
}
return instance;
});
} else {
console.warn('Failed to create form instance');
}
Expand Down