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

master
sigonasr2, Sig, Sigo 4 years ago
parent 65c51606bd
commit 2263242ba9
  1. 2
      src/App.js

@ -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)

Loading…
Cancel
Save