AddBikeView
Extends:
Class for the AddBike 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 |
constructor(props: Object) Creates an instance of the add bike view |
Member Summary
Public Members | ||
public |
AddBikeP: * |
|
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 mounted |
|
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 |
deleteCallback(success: Boolean): * Sets a callback on what to do if there is a success or error when a bike is uploaded. |
|
public |
deletePrompt: * Prompt to ask the user if they want to delete the bike |
|
public |
A function to execute when the editing state is false. |
|
public |
A function to execute when the editing state is true. |
|
public |
isEditBikePage(title: string): Boolean: * Checks if the title of the view is edit bike, and if so, returns true. |
|
public |
refreshState: * 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 |
_clearData: * 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 |
_keyExtractor(item: Object, index: Number): * 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): Component: * Render a text input item. |
|
private |
_renderName(name: string): Component: * Renders the name of a required field. |
|
private |
_renderText(colour: string, name: string): Component: * Generates the style and colouring of the colours in the multiselect. |
Method Summary
Public Methods | ||
public |
render(): Component Renders items to the screen |
Static Public Members
Public Constructors
Public Members
public AddBikeP: * 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 deleteCallback(success: Boolean): * source
Sets a callback on what to do if there is a success or error when a bike is uploaded.
public isEditBikePage(title: string): Boolean: * source
Checks if the title of the view is edit bike, and if so, returns true.
public state: * source
Private Members
private _forceRefresh: * source
DON'T USE THIS METHOD UNLESS ABSOLUTELY NECESSARY. Force a refresh of the view.
private _keyExtractor(item: Object, index: Number): * source
Extract the key from the item and index
private _onSelectedItemsChange(selectedItems: List): * source
Add the new selected items to the state and update
private _renderItem(item: Object): Component: * source
Render a text input item.
Return:
Component | A react component |