Reference Source
public class | source

ReportFoundView

Extends:

* → ReportFoundView

Class for the reportfound 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 report found view

Member Summary

Public Members
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 before rendering.

public

Component is about to unmount.

public

onRegionChange(region: Object): *

Region has changed so set the state to the new region.

public

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

public
public

Get needed data from the view and send it to presenter.

public

state: {"text": *, "bikeMenu": *, "region": *, "thisMarker": *}

Private Members
private

Events after selecting the item from the dropdown menu

private

Get user's current location.

private

_onBack: *

The back function to go to the previous page.

private

Set the location of user.

Method Summary

Public Methods
public

render()

Renders the react native component.

public

Sets a marker in the state.

Private Methods
private

Render the text of button.

private

_dropdown_2_renderRow(rowData: Object, rowID: Number, highlighted: Boolean)

Render each row in the menu.

private

Handle the events after clicking submit button.

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 report found view

Params:

NameTypeAttributeDescription
props Object

Component properties

Public Members

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 componentDidMount: * source

Component mounted

public componentWillMount: * source

Component is about to mount, initialize the data before rendering.

public componentWillUnmount: * source

Component is about to unmount.

public onRegionChange(region: Object): * source

Region has changed so set the state to the new region.

public refreshState: * source

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

public reportfoundP: * source

public sendUpdate: * source

Get needed data from the view and send it to presenter.

public state: {"text": *, "bikeMenu": *, "region": *, "thisMarker": *} source

Private Members

private _dropdown_2_onSelect(idx: Number, value: Object): * source

Events after selecting the item from the dropdown menu

private _getCurrentLocation: * source

Get user's current location.

private _onBack: * source

The back function to go to the previous page.

private _setUserLocation: * source

Set the location of user.

Public Methods

public render() source

Renders the react native component.

public setMarker(e: Object) source

Sets a marker in the state. Only one marker is stored at a time.

Params:

NameTypeAttributeDescription
e Object

A place marker event

Private Methods

private _dropdown_2_renderButtonText(rowData: Object): string source

Render the text of button.

Params:

NameTypeAttributeDescription
rowData Object

the row data of the bike menu

Return:

string

Returns the name of the component

private _dropdown_2_renderRow(rowData: Object, rowID: Number, highlighted: Boolean) source

Render each row in the menu. Highlights the selected item.

Params:

NameTypeAttributeDescription
rowData Object

each data in bikemenu

rowID Number

the id of item in the menu

highlighted Boolean

If the component should be highlighted or not

private _handleClick() source

Handle the events after clicking submit button.