Skip to content

Commit

Permalink
fix(examples/tasks): add click handler
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolguevara committed Nov 7, 2023
1 parent e5375d6 commit 82a9fba
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions apps/www/src/routes/examples/tasks/(components)/data-table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
tableAttrs,
tableBodyAttrs,
pluginStates: {
custom: { sidebar, taskIdOnEdition, taskOnEdition }
custom: { sidebar, taskIdOnEdition }
}
} = tableModel;
Expand All @@ -239,6 +239,11 @@
(!$anySidebarVisible
? 0
: ($leftSidebarVisible ? 2 : 0) + ($rightSidebarVisible ? 3 : 0));
function taskCellClicked(row: any) {
const cells = row.cellForId;
taskIdOnEdition.set(cells.task.value);
}
</script>

<div class="relative rounded-md border">
Expand Down Expand Up @@ -299,13 +304,10 @@
variant="link"
size="sm"
class="underline"
on:click={() => {
const cells =
row.cellForId;
taskIdOnEdition.set(
cells.task.value
);
}}
on:click={() =>
taskCellClicked(
row
)}
>
<Render
of={cell.render()}
Expand Down

0 comments on commit 82a9fba

Please sign in to comment.