fix: e_rw.id was overwriting e_ro.id

This commit is contained in:
Johannes Lötzsch 2022-03-15 04:55:46 +01:00
parent 2da7d0fe27
commit bd56ea9487
1 changed files with 3 additions and 2 deletions

View File

@ -144,9 +144,10 @@ const HostOfferLookupTable = ({data_ro, data_rw, refetch_rw, onFilteredDataChang
// @ts-ignore
const data = filterUndefOrNull( data_ro
?.map( e_ro => ({
...e_ro,
...((data_rw?.find((e_rw) => e_ro.id_tmp === e_rw.id || `rw_${e_ro.id}` === e_rw.id
) || rw_default))}) ) || [])
) || rw_default)),
...e_ro
}) ) || [])
// @ts-ignore
data && setDataSource(data)