Skip to content
Merged

Dev #53

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/plugin/VStepperForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
</template>

<template #prev>
<!-- :disabled="((stepperActionsDisabled === 'prev' || settings.disabled || canReviewPreviousButtonDisabled) as boolean)" -->
<v-btn
data-cy="vsf-previous-button"
:disabled="prevButtonDisabled"
Expand Down Expand Up @@ -630,16 +629,15 @@ function callbacks() {

// ------------------------ Conditional "when" callbacks //
const computedPages = computed<Page[]>(() => {
// const localPages = JSON.parse(JSON.stringify(pages));
Object.values(pages.value).forEach((page: Page, pageIdx: number) => {
const localPage = page;
localPage.visible = true;

if (localPage.when) {
const enabledPage: boolean = (localPage.when as (value: any) => boolean)($useForm.values);

if (pages[pageIdx]) {
pages[pageIdx].visible = enabledPage;
if (pages.value[pageIdx]) {
pages.value[pageIdx].visible = enabledPage;
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface Field {
errorMessages?: string | string[];
hidden?: boolean;
hideDetails?: GlobalHideDetails;
id?: string;
id?: string | number;
inline?: boolean; // ? Checkboxes //
inlineSpacing?: string; // ? Checkboxes //
items?: readonly any[] | undefined;
Expand Down