Fix key
This commit is contained in:
@@ -190,12 +190,16 @@ class SymptomBox extends Component {
|
|||||||
class FillerBoxes extends Component {
|
class FillerBoxes extends Component {
|
||||||
render() {
|
render() {
|
||||||
const n = Dimensions.get('window').width / styles.symptomBox.minHeight
|
const n = Dimensions.get('window').width / styles.symptomBox.minHeight
|
||||||
return Array(Math.ceil(n)).fill(
|
const fillerBoxes = []
|
||||||
|
for (let i = 0; i < Math.ceil(n); i++) {
|
||||||
|
fillerBoxes.push(
|
||||||
<View
|
<View
|
||||||
width={styles.symptomBox.minHeight}
|
width={styles.symptomBox.minHeight}
|
||||||
height={0}
|
height={0}
|
||||||
key={Math.random().toString()}
|
key={i.toString()}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
return fillerBoxes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user