検索内容の重複管理を実装
This commit is contained in:
parent
fbd76a0cf6
commit
fdd0c78adc
9
menu.js
9
menu.js
@ -192,11 +192,16 @@ export default function Menu(props) {
|
||||
returnData.push([D]);
|
||||
});
|
||||
});
|
||||
if (JSON.stringify(returnData) == JSON.stringify(listUpStation)) return;
|
||||
} else {
|
||||
const hoge = getStationDataFromNameBase(input);
|
||||
hoge.forEach(d=>returnData.push([d]));
|
||||
hoge.forEach((d, index, array) => {
|
||||
const stationName = d.Station_JP;
|
||||
if (returnData.findIndex((d1) => d1[0].Station_JP == stationName) != -1)
|
||||
return;
|
||||
returnData.push(array.filter((d2) => d2.Station_JP == stationName));
|
||||
});
|
||||
}
|
||||
if (JSON.stringify(returnData) == JSON.stringify(listUpStation)) return;
|
||||
setListUpStation(returnData);
|
||||
} else if (stationListMode == "position") {
|
||||
const returnData = nearPositionStation.filter((d) => d != undefined);
|
||||
|
Loading…
Reference in New Issue
Block a user