state = {
history2:[]
}
Dlaczego pokazywany jest tylko ostatni element zamiast wszystkich? Tablica history2 pokazuje mi tylko ostatni element a warunek zawiera wiecej elementow
for (const point of this.state.idRt) {
if (id === point.RouteId) {
this.setState({
history2: {
Name: point.Name,
}
})
}
}