Skip to content

Commit c0a747f

Browse files
committed
fix: tweak stepper web form setup after rebase to latest
1 parent 252ffe5 commit c0a747f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/web-forms/src/components/OdkWebForm.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface OdkWebFormsProps {
3636
* with collapsable groups. This param changes to a stepper layout
3737
* closer to Collect.
3838
*/
39-
stepperLayout?: boolean;
39+
readonly stepperLayout?: boolean;
4040
4141
/**
4242
* Note: this parameter must be set when subscribing to the
@@ -150,7 +150,6 @@ const emit = defineEmits<OdkWebFormEmits>();
150150
151151
const state = initializeFormState();
152152
const submitPressed = ref(false);
153-
const showSendButton = ref(props.stepperLayout ? false : true);
154153
155154
const init = async () => {
156155
state.value = await loadFormState(props.formXml, {
@@ -240,20 +239,20 @@ watchEffect(() => {
240239
<template #content>
241240
<div class="form-questions">
242241
<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" />
244243
<!-- 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)" />
246245
</div>
247246
</div>
248247
</template>
249248
</Card>
250249

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">
252251
<Button label="Send" rounded @click="handleSubmit(state)" />
253252
</div>
254253
</div>
255254

256-
<div v-if="showSendButton" class="powered-by-wrapper">
255+
<div v-if="!props.stepperLayout" class="powered-by-wrapper">
257256
<a class="anchor" href="https://getodk.org" target="_blank">
258257
<span class="caption">Powered by</span>
259258
<img

0 commit comments

Comments
 (0)