mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: relationship to many creation
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
export let id: string;
|
||||
export let label: string;
|
||||
export let optionalText: string | undefined = undefined;
|
||||
export let value: string | number | boolean | null;
|
||||
export let value: string | number | boolean | null | string[];
|
||||
export let editing = false;
|
||||
export let attribute:
|
||||
| Models.AttributeBoolean
|
||||
|
||||
+3
-7
@@ -68,12 +68,6 @@
|
||||
//Reactive statements
|
||||
$: getDocuments(search).then((res) => (documentList = res));
|
||||
|
||||
$: if (!!attribute?.type && isRelationshipToMany(attribute)) {
|
||||
// value = relatedList;
|
||||
} else {
|
||||
value = singleRel;
|
||||
}
|
||||
|
||||
$: paginatedItems = editing
|
||||
? relatedList
|
||||
.slice()
|
||||
@@ -163,6 +157,7 @@
|
||||
bind:value={relatedList[total]}
|
||||
options={options?.filter((n) => !relatedList.includes(n.value))}
|
||||
on:select={() => {
|
||||
value = relatedList;
|
||||
showInput = false;
|
||||
}}
|
||||
let:option={o}>
|
||||
@@ -254,7 +249,8 @@
|
||||
bind:search
|
||||
bind:value={singleRel}
|
||||
{options}
|
||||
let:option={o}>
|
||||
let:option={o}
|
||||
on:select={() => (value = singleRel)}>
|
||||
<SelectSearchItem data={o.data}>
|
||||
{o.label}
|
||||
</SelectSearchItem>
|
||||
|
||||
Reference in New Issue
Block a user