mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Ensure Update button is enabled when updating a many relationship
The original array was being modified in the relationship component so when the data page checked if work was different than doc, it was always the same. Fixes #5379
This commit is contained in:
+2
-2
@@ -3,12 +3,12 @@
|
||||
import { PaginationInline } from '$lib/components';
|
||||
import { SelectSearchItem } from '$lib/elements';
|
||||
import { Button, InputSelectSearch, Label } from '$lib/elements/forms';
|
||||
import { preferences } from '$lib/stores/preferences';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Query, type Models } from '@appwrite.io/console';
|
||||
import { onMount } from 'svelte';
|
||||
import { doc } from '../store';
|
||||
import { isRelationshipToMany } from './store';
|
||||
import { preferences } from '$lib/stores/preferences';
|
||||
|
||||
export let id: string;
|
||||
export let label: string;
|
||||
@@ -32,7 +32,7 @@
|
||||
onMount(async () => {
|
||||
if (value) {
|
||||
if (isRelationshipToMany(attribute)) {
|
||||
relatedList = value as string[];
|
||||
relatedList = (value as string[]).slice();
|
||||
} else {
|
||||
singleRel = value as string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user