You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,60 @@ Example:
124
124
/>
125
125
```
126
126
127
+
### Initial state
128
+
129
+
In rare case when you need to skip the beginning of he flow, you can start the flow from any of the steps.
130
+
131
+
-**initialStepState** - initial state of component that will be rendered on load.
132
+
133
+
```tsx
134
+
initialStepState?:StepState
135
+
136
+
typeStepState=
137
+
| {
138
+
type:StepType.upload
139
+
}
140
+
| {
141
+
type:StepType.selectSheet
142
+
workbook:XLSX.WorkBook
143
+
}
144
+
| {
145
+
type:StepType.selectHeader
146
+
data:RawData[]
147
+
}
148
+
| {
149
+
type:StepType.matchColumns
150
+
data:RawData[]
151
+
headerValues:RawData
152
+
}
153
+
| {
154
+
type:StepType.validateData
155
+
data:any[]
156
+
}
157
+
158
+
typeRawData=Array<string|undefined>
159
+
160
+
// XLSX.workbook type is native to SheetJS and can be viewed here: https://github.com/SheetJS/sheetjs/blob/83ddb4c1203f6bac052d8c1608b32fead02ea32f/types/index.d.ts#L269
0 commit comments