fix sorting
This commit is contained in:
@@ -104,8 +104,7 @@
|
||||
}
|
||||
|
||||
// remove trashed edges
|
||||
graph.edges = graph.edges?.filter((edge) => !edge._isTrashed && edge.source === record.id) ?? null;
|
||||
|
||||
graph.edges = graph.edges?.filter((edge) => !edge._isTrashed && edge.source === record.id);
|
||||
axios
|
||||
.post(channel.lucentUrl + "/records", {
|
||||
record: record,
|
||||
@@ -158,7 +157,7 @@
|
||||
|
||||
{#if !["_graph", "_info"].includes(activeContentTab) && isWritable}
|
||||
<div class="shadow-lg "
|
||||
style="position:fixed;bottom:0;left:0px;width:100%;background: rgb(206, 223, 210);z-index:1050"
|
||||
style="position:fixed;bottom:0;left:0px;width:100%;background: rgb(206, 223, 210);z-index:1050"
|
||||
>
|
||||
<div
|
||||
class="d-flex mt-3 mb-3 align-items-center justify-content-center"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
$: references = graph.edges
|
||||
.filter((edge) => edge.field === field.name)
|
||||
.map((edge) => {
|
||||
return graph.records.find((increc) => increc.id == edge.target && record.id == edge.source);
|
||||
return graph.records.find((increc) => increc.id === edge.target && record.id === edge.source);
|
||||
}).filter((rec) => (rec?.id ? true : false)) ?? [];
|
||||
|
||||
let collections = channel.schemas.filter((aschema) =>
|
||||
@@ -38,7 +38,6 @@
|
||||
}
|
||||
|
||||
function reorder(e) {
|
||||
|
||||
graph.edges = sortByField(e.detail.source, e.detail.target, graph.edges, field.name);
|
||||
}
|
||||
|
||||
@@ -46,7 +45,6 @@
|
||||
function insert(e) {
|
||||
e.preventDefault();
|
||||
graph = insertEdges(graph,record,e.detail.records,field.name,e.detail.action);
|
||||
console.log(graph)
|
||||
}
|
||||
|
||||
$:visibleColumns = [];
|
||||
@@ -64,7 +62,6 @@
|
||||
{/if}
|
||||
<div class="inline-card-wrapper">
|
||||
<ReferenceInlineButtons
|
||||
{field}
|
||||
buttonClass="mt-2"
|
||||
recordId={null}
|
||||
schemas={collections}
|
||||
|
||||
Reference in New Issue
Block a user