Skip to content

stepView error #4

@creativeknights2012

Description

@creativeknights2012

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'
			}
		}
	};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions