@@ -36,7 +36,7 @@ export interface OdkWebFormsProps {
36
36
* with collapsable groups. This param changes to a stepper layout
37
37
* closer to Collect.
38
38
*/
39
- stepperLayout? : boolean ;
39
+ readonly stepperLayout? : boolean ;
40
40
41
41
/**
42
42
* Note: this parameter must be set when subscribing to the
@@ -150,7 +150,6 @@ const emit = defineEmits<OdkWebFormEmits>();
150
150
151
151
const state = initializeFormState ();
152
152
const submitPressed = ref (false );
153
- const showSendButton = ref (props .stepperLayout ? false : true );
154
153
155
154
const init = async () => {
156
155
state .value = await loadFormState (props .formXml , {
@@ -240,20 +239,20 @@ watchEffect(() => {
240
239
<template #content >
241
240
<div class =" form-questions" >
242
241
<div class =" flex flex-column gap-2" >
243
- <QuestionList v-if =" !stepperLayout" :nodes =" state.root.currentState.children" />
242
+ <QuestionList v-if =" !props. stepperLayout" :nodes =" state.root.currentState.children" />
244
243
<!-- Note that QuestionStepper has the 'Send' button integrated instead of using the button below -->
245
- <QuestionStepper v-if =" stepperLayout" :nodes =" state.root.currentState.children" @sendFormFromStepper =" handleSubmit(state)" />
244
+ <QuestionStepper v-if =" props. stepperLayout" :nodes =" state.root.currentState.children" @sendFormFromStepper =" handleSubmit(state)" />
246
245
</div >
247
246
</div >
248
247
</template >
249
248
</Card >
250
249
251
- <div v-if =" showSendButton " class =" footer flex justify-content-end flex-wrap gap-3" >
250
+ <div v-if =" !props.stepperLayout " class =" footer flex justify-content-end flex-wrap gap-3" >
252
251
<Button label =" Send" rounded @click =" handleSubmit(state)" />
253
252
</div >
254
253
</div >
255
254
256
- <div v-if =" showSendButton " class =" powered-by-wrapper" >
255
+ <div v-if =" !props.stepperLayout " class =" powered-by-wrapper" >
257
256
<a class =" anchor" href =" https://getodk.org" target =" _blank" >
258
257
<span class =" caption" >Powered by</span >
259
258
<img
0 commit comments