Skip to content

Commit 393edfe

Browse files
committed
fix(renderer): fix wizard context types
- formOptions are defined in rendererContext
1 parent 1c7f1ec commit 393edfe

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

packages/react-form-renderer/src/files/wizard-context.d.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
import { ReactNode } from 'react';
2-
import { FormApi } from 'final-form';
3-
import Field from './field';
4-
import { AnyObject } from './common';
5-
6-
export interface FormOptions extends FormApi {
7-
registerInputFile?: (name: string) => void;
8-
unRegisterInputFile?: (name: string) => void;
9-
onCancel?: (values: object, ...args: any[]) => void;
10-
onReset?: () => void;
11-
handleSubmit: () => Promise<AnyObject | undefined> | undefined;
12-
clearedValue?: any;
13-
renderForm: (fields: Field[]) => ReactNode[];
14-
}
1+
import { FormOptions } from './renderer-context';
152

163
export interface WizardContextValue {
174
formOptions: FormOptions;
18-
5+
crossroads: string[];
6+
currentStep: string;
7+
handlePrev: Function;
8+
onKeyDown: Function;
9+
jumpToStep: Function;
10+
setPrevSteps: Function;
11+
handleNext: Function;
12+
navSchema: Object;
13+
activeStepIndex: number;
14+
maxStepIndex: number;
15+
isDynamic: boolean;
16+
prevSteps: string[];
1917
}
2018

2119
interface WizardContext {

0 commit comments

Comments
 (0)