MarketsHeader

Members

state :object

Source:
Properties:
Name Type Description
showedMarket Array

Contain 4 showed martets of list of the all markets

dropdownList Array

Contain the rest of the markets that are not showed currently

activeTab number

Is index of selected market in showed market array

isDropDownOpen boolean

Indicate is dropdown of not showed markets open

isInfoOpen boolean

Indicate is information about selected market is open

Type:
  • object

Methods

changeSubselection(index) → {void}

Source:

Change selected subselection index

Parameters:
Name Type Description
index number
Returns:
Type
void

changeTab(index) → {void}

Source:

Change active market

Parameters:
Name Type Description
index number
Returns:
Type
void

componentDidMount() → {void}

Source:

Setup state of component

Returns:
Type
void

componentDidUpdate(prevProps) → {void}

Source:

When league is changed setup component

Parameters:
Name Type Description
prevProps object
Returns:
Type
void

handleSubselectionName(market, name) → {string}

Source:

Format subselection name

Parameters:
Name Type Description
market object
name string
Returns:
Type
string

initMarkets() → {void}

Source:

Put first 4 markets in showedMarket and the rest in dropdownList array

Returns:
Type
void

render() → {view}

Source:

Render

Returns:
Type
view

renderInfoHeader(selectedMarket) → {view}

Source:

Render info header

Parameters:
Name Type Description
selectedMarket object
Returns:
Type
view

renderSelections(selectedMarket) → {view}

Source:

Render selection view

Parameters:
Name Type Description
selectedMarket object
Returns:
Type
view

selectMarket(e) → {void}

Source:

Change selected market and refill dropdownList and showedMarkets arrays

Parameters:
Name Type Description
e Event

Its event with id of selected market

Returns:
Type
void

setDropDownList(showedMarket) → {Array}

Source:

Fill dropdownList array with the rest of the markets that are not in showedMarkets

Parameters:
Name Type Description
showedMarket Array
Returns:

Array of markets showen in dropdown

Type
Array

toggleDropDown() → {void}

Source:

Toggle dropdown of hidden markets

Returns:
Type
void

toggleInfo() → {void}

Source:

Toggle information view

Returns:
Type
void

Type Definitions

props

Source:
Properties:
Name Type Description
selectedLeague object
markets Array
selectedSubselection number
selectedMarket object
isCorrectScoreSelected boolean
setSelectedMarket function
setSelectedSubselection function
Type:
  • object