Class: MultiComponent

MultiComponent(dataObjectopt, optionsopt)

MultiComponent holds a set of Components and shows one at a time.

Constructor

new MultiComponent(dataObjectopt, optionsopt)

Parameters:
Name Type Attributes Default Description
dataObject DataObject <optional>
null
options Object <optional>
{}
Properties
Name Type Attributes Default Description
components Array.<Component> <optional>
[]
Source:
Example
const multiComponent = new MultiComponent(undefined, {
	components: [
		new EditProfileComponent(...),
		new EditEmailComponent(...),
		new EditBioComponent(...)
	]
})
// Now multiComponent is showing just the first component, EditProfileComponent
multiComponent.showAt(1) // Hide EditProfileComponent and show EditEmailComponent

Methods

show(component)

Parameters:
Name Type Description
component Component The component to show. It will be added to this.components if it isn't already in there
Source:

showAt(index)

Parameters:
Name Type Description
index number The index in this.components of the Component to show
Source: