Created
February 23, 2018 23:08
-
-
Save goldensunliu/a0ab53255fa94c180a9c65a2bd1e9d45 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getSelectedCell() { | |
const { board } = this.state | |
const selected = board.get('selected') | |
return selected && board.get('puzzle').getIn([selected.x,selected.y]) | |
} | |
renderCell(cell, x, y) { | |
const { board } = this.state | |
const selected = this.getSelectedCell() | |
const sameValue = selected && selected.get('value') && value === selected.get('value') | |
const isSelected = cell === selected | |
return <Cell prefilled={prefilled} notes={notes} sameValue={sameValue} isSelected={isSelected} isPeer={peer} value={value} | |
onClick={() => { this.selectCell(x, y)}} key={y} x={x} y={y} conflict={conflict}/> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment