Class: Search

Search()

Search component, allows currently logged in user to find their buddies by their exact username.

Constructor

Source:

Methods

doAdd(event)

When user finds their buddy on the platform by username, they can click the "Add" button to add them into their circle, and this function fires up to make the relavant api calls.

Parameters:
Name Type Description
event Object

Event object

Source:

doSearch(event)

Takes the searched username string from the state of component and attempts to get the user data from the backend.

Parameters:
Name Type Description
event Object

Event object

Source:

render()

Renders the input form based on current state of the component.

Source:

textInputHandler(event)

Executes at each keystroke of user for any input text field in the component. As soon as it receives any keystroke from user, this method updates the state of the component accordingly.

Parameters:
Name Type Description
event Object

Event object

Source: