mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
update: use callbacks where required.
This commit is contained in:
+5
-1
@@ -16,7 +16,11 @@
|
||||
<Layout.Stack>
|
||||
{#each columns as column}
|
||||
{@const label = column.key}
|
||||
<ColumnItem {column} bind:formValues {label} />
|
||||
<ColumnItem
|
||||
{label}
|
||||
{column}
|
||||
{formValues}
|
||||
onUpdateFormValues={(values) => (formValues = values)} />
|
||||
{/each}
|
||||
|
||||
{#if customId !== undefined}
|
||||
|
||||
+6
@@ -119,6 +119,12 @@
|
||||
createMore = false;
|
||||
}
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
if ($createRow) {
|
||||
console.log($createRow.row);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if $createRow}
|
||||
|
||||
+10
-1
@@ -118,6 +118,10 @@
|
||||
|
||||
firstInput?.focus({ preventScroll: true });
|
||||
}
|
||||
|
||||
function updateRowData(values: object) {
|
||||
work.set(values as Models.Row);
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $table.columns?.length && work}
|
||||
@@ -125,7 +129,12 @@
|
||||
<Layout.Stack direction="column" gap="l">
|
||||
{#each $table.columns as column}
|
||||
{@const label = column.key}
|
||||
<ColumnItem {column} bind:formValues={$work} {label} editing />
|
||||
<ColumnItem
|
||||
{column}
|
||||
{label}
|
||||
editing
|
||||
formValues={$work}
|
||||
onUpdateFormValues={updateRowData} />
|
||||
{/each}
|
||||
</Layout.Stack>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user