endpoint no longer sorts properly. Do the sort on the frontend.

This commit is contained in:
sigonasr2, Sig, Sigo 2021-08-03 05:01:59 +00:00
parent 65c51606bd
commit 2263242ba9

View File

@ -487,7 +487,7 @@ function TableEditor(p) {
cols.filter((col)=>col.name!=="id"&&col.name.includes("_id")).forEach((col)=>{ cols.filter((col)=>col.name!=="id"&&col.name.includes("_id")).forEach((col)=>{
promise_list.push(axios.get(BACKEND_URL+"/"+col.name.replace("_id","")) promise_list.push(axios.get(BACKEND_URL+"/"+col.name.replace("_id",""))
.then((data)=>{ .then((data)=>{
dependency_map[col.name]=data.data.rows.reverse() dependency_map[col.name]=data.data.rows.sort((a,b)=>b.id-a.id)
})) }))
}) })
setData(rows) setData(rows)