-
Notifications
You must be signed in to change notification settings - Fork 1
ResultPage
This component works as a controller, dealing with all the logic related to result displaying and user interaction.
public handleShareClick(event: any)
This method is called when the user clicks the SHARE button. It copies the results page link to clipboard, and shows a tooltip to inform the user.
public handleTooltipClose
This method is called when the user moves the mouse outside of the SHARE button to close the tooltip.
public handleMoreInfo (newValue:number, questionId:number)
This method is called when the user clicks the more info button on a specific to-do item. It:
- Switch to the tab whose value is
newValue
. - Calls
scrollToQuestion
to scroll to the corresponding result report of the question the todo item belongs to, and highlight it.
public scrollToQuestion(id: string)
This method is used to scroll the element with the given ID into view and highlight it.
public handleChange = (event: React.ChangeEvent<{}>, newValue: number)
This method is called when the user clicks a tab. It switches to the tab whose value is newValue
and renders the corresponding content under that tab.
public getResultByKey(key: string)
This method is used to get a list of data used to render the view from the results context. For example, do now items, do later items and result reports.
public getTabList()
This method is used to get a tab list and corresponding content under each tab.