File tree 3 files changed +12
-8
lines changed
app-aco/src/components/FolderTree/List
app-form-builder/src/components/Form
app-page-builder-elements/src/renderers/form 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -99,10 +99,13 @@ export const List: React.VFC<ListProps> = ({
99
99
setOpenFolderIds ( [ ROOT_FOLDER , ...folderIds ] ) ;
100
100
} ;
101
101
102
- const canDrag = useCallback ( ( folderId : string ) => {
103
- const isRootFolder = folderId === ROOT_FOLDER ;
104
- return ! isRootFolder && canManageFolderStructure ( folderId ) ;
105
- } , [ ] ) ;
102
+ const canDrag = useCallback (
103
+ ( folderId : string ) => {
104
+ const isRootFolder = folderId === ROOT_FOLDER ;
105
+ return ! isRootFolder && canManageFolderStructure ( folderId ) ;
106
+ } ,
107
+ [ canManageFolderStructure ]
108
+ ) ;
106
109
107
110
return (
108
111
< >
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ const FormRender: React.FC<FbFormRenderComponentProps> = props => {
89
89
// Check if the form is a multi step.
90
90
const isMultiStepForm = formData . steps . length > 1 ;
91
91
92
- const isFirstStep = isMultiStepForm && currentStepIndex === 0 ;
93
- const isLastStep = ! isMultiStepForm || currentStepIndex === steps . length - 1 ;
92
+ const isFirstStep = currentStepIndex === 0 ;
93
+ const isLastStep = currentStepIndex === steps . length - 1 ;
94
94
95
95
// We need this check in case we deleted last step and at the same time we were previewing it.
96
96
const currentStep =
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ const FormRender: React.FC<FormRenderProps> = props => {
49
49
setCurrentStepIndex ( prevStep => ( prevStep -= 1 ) ) ;
50
50
} ;
51
51
52
- const isFirstStep = isMultiStepForm && currentStepIndex === 0 ;
53
- const isLastStep = isMultiStepForm && currentStepIndex === formData . steps . length - 1 ;
52
+ const isFirstStep = currentStepIndex === 0 ;
53
+ const isLastStep = currentStepIndex === formData . steps . length - 1 ;
54
54
55
55
const currentStep =
56
56
formData . steps [ currentStepIndex ] === undefined
@@ -191,6 +191,7 @@ const FormRender: React.FC<FormRenderProps> = props => {
191
191
}
192
192
} ;
193
193
}
194
+
194
195
const formSubmission = await createFormSubmission ( {
195
196
props,
196
197
formSubmissionFieldValues,
You can’t perform that action at this time.
0 commit comments