Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stepView error #4

Open
creativeknights2012 opened this issue Jun 6, 2023 · 0 comments
Open

stepView error #4

creativeknights2012 opened this issue Jun 6, 2023 · 0 comments

Comments

@creativeknights2012
Copy link

creativeknights2012 commented Jun 6, 2023

vue-router.mjs:3472 TypeError: Cannot read properties of undefined (reading 'stepView')
at setup (vr-wizard.esm.js:4524:1)
at callWithErrorHandling (runtime-core.esm-bundler.js:158:1)
at setupStatefulComponent (runtime-core.esm-bundler.js:7236:1)
at setupComponent (runtime-core.esm-bundler.js:7197:1)
at mountComponent (runtime-core.esm-bundler.js:5599:1)
at processComponent (runtime-core.esm-bundler.js:5565:1)
at patch (runtime-core.esm-bundler.js:5040:1)
at mountChildren (runtime-core.esm-bundler.js:5284:1)
at mountElement (runtime-core.esm-bundler.js:5191:1)
at processElement (runtime-core.esm-bundler.js:5156:1)

<VrWizard :id="wizConfig.id"
		  :options="wizOptions"
		  :context="wizConfig.context"
		  :states="wizConfig.states"
		  :initial="wizConfig.initial"
		  :onComplete="onComplete"
		  :showStepsProgress="true"
		  title="Registration Wizard"
		  description=""
		  nextText="Forward"
		  prevText="Back" 
		  doneText="Complete"/>

const wizConfig = {
		id: 'registration',
		initial: 'basic',
		context: {
			completedSteps: [],
			user: {
				username: '',
				password: '',
				confirmUser: ''
			},
			agreeToTerms: false,
			subscriptionChoice: ''
		},
		states: {
			Basic: {
				id: 'basic',
				title: 'Basic',
				meta: { description: 'Sign Up' },
				stepView: RegisterBasic,
				order: 0,
				on: {
					NEXT: { cond: 'isAgreeToTerm' }
				}
			},
			Personal: {
				id: 'personal',
				title: 'Personal',
				meta: { description: 'Personal' },
				stepView: RegisterPersonal,
				order: 1
			},
			Choice: {
				id: 'choice',
				title: 'Choice',
				meta: { description: 'Choice' },
				stepView: RegisterChoice,
				order: 2,
				on: {
					SELECT_METHOD: {
						actions: assign({ subscriptionMethod: (_, event) => event.method })
					},
					NEXT: {
						cond: ''
					}
				}
			},
			Business: {
				id: 'business',
				title: 'Business',
				meta: { description: 'Business' },
				stepView: RegisterBusiness,
				order: 3
			},
			Subscription: {
				id: 'basic',
				title: '',
				meta: { description: 'Subscription' },
				stepView: RegisterSubscription,
				order: 4,
				type: 'final'
			}
		}
	};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant