Reference Source
public class | source

ProfileView

Extends:

* → ProfileView

Class for the Profile view

Static Member Summary

Static Public Members
public static

Set the navigation options, change the header to handle a back button.

Constructor Summary

Public Constructor
public

Creates an instance of the profile view

Member Summary

Public Members
public
public

alertCallback(success: Boolean): *

Sets a callback on what to do if there is a success or error when a bike is uploaded.

public

Component is about to mount, initialize the data.

public

Component will unmount after this method is called, do any clean up here Call viewUnmounting in base class so it can do any cleanup for the view before calling the presenter destroy method

public

A function to execute when the editing state is false.

public

A function to execute when the editing state is true.

public

Refreshes the state of the component so new data is fetched.

public

Resets all the data and goes back to the bike page

public

setEditing(edit: Boolean): *

Set the editing value to the passed in value.

public

state: *

public

Toggle the editing mode.

Private Members
private

Clears all the data

private

Disables the loader.

private

Enables the loader.

private

DON'T USE THIS METHOD UNLESS ABSOLUTELY NECESSARY. Force a refresh of the view.

private

Get the data from the state and send an update to the presenter

private

Alert for requirement input failure

private

Extract the key from the item and index

private

_onBack: *

When the back button is clicked, check if the user was editing.

private

_onSelectedItemsChange(selectedItems: List): *

Add the new selected items to the state and update

private

_renderItem(item: Object): *

Render a text input item.

private

Renders the name of a required field.

Method Summary

Public Methods
public

render(): Component

Renders items to the screen

Static Public Members

public static navigationOptions: Object: * source

Set the navigation options, change the header to handle a back button.

Return:

Object

Navigation option

Public Constructors

public constructor(props: Object) source

Creates an instance of the profile view

Params:

NameTypeAttributeDescription
props Object

Component properties

Public Members

public ProfileP: * source

public alertCallback(success: Boolean): * source

Sets a callback on what to do if there is a success or error when a bike is uploaded.

public componentWillMount: * source

Component is about to mount, initialize the data. This function is called before componentDidMount

public componentWillUnmount: * source

Component will unmount after this method is called, do any clean up here Call viewUnmounting in base class so it can do any cleanup for the view before calling the presenter destroy method

public editingFailure: * source

A function to execute when the editing state is false.

public editingSuccess: * source

A function to execute when the editing state is true.

public refreshState: * source

Refreshes the state of the component so new data is fetched.

public resetAllOnBack: * source

Resets all the data and goes back to the bike page

public setEditing(edit: Boolean): * source

Set the editing value to the passed in value.

public state: * source

public toggleEditing: * source

Toggle the editing mode.

Private Members

private _clearData: * source

Clears all the data

private _disableLoader: * source

Disables the loader.

private _enableLoader: * source

Enables the loader.

private _forceRefresh: * source

DON'T USE THIS METHOD UNLESS ABSOLUTELY NECESSARY. Force a refresh of the view.

private _getDataToUpdate: * source

Get the data from the state and send an update to the presenter

private _inputRequirementFailure: * source

Alert for requirement input failure

private _keyExtractor: * source

Extract the key from the item and index

private _onBack: * source

When the back button is clicked, check if the user was editing.

private _onSelectedItemsChange(selectedItems: List): * source

Add the new selected items to the state and update

private _renderItem(item: Object): * source

Render a text input item.

private _renderName: * source

Renders the name of a required field.

Public Methods

public render(): Component source

Renders items to the screen

Return:

Component