From 0506adee50b73a3eb2fe9adbd11e9db83191205a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 2 Oct 2023 09:18:25 +0100 Subject: [PATCH] Update row click event name to match best practices --- packages/client/src/components/app/GridBlock.svelte | 2 +- .../frontend-core/src/components/grid/layout/GridRow.svelte | 2 +- .../src/components/grid/layout/StickyColumn.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/app/GridBlock.svelte b/packages/client/src/components/app/GridBlock.svelte index 916f1aa447..375cba6039 100644 --- a/packages/client/src/components/app/GridBlock.svelte +++ b/packages/client/src/components/app/GridBlock.svelte @@ -58,7 +58,7 @@ showControls={false} notifySuccess={notificationStore.actions.success} notifyError={notificationStore.actions.error} - on:row-click={e => handleRowClick?.({ row: e.detail })} + on:rowclick={e => handleRowClick?.({ row: e.detail })} /> diff --git a/packages/frontend-core/src/components/grid/layout/GridRow.svelte b/packages/frontend-core/src/components/grid/layout/GridRow.svelte index 260898da56..bd65d34498 100644 --- a/packages/frontend-core/src/components/grid/layout/GridRow.svelte +++ b/packages/frontend-core/src/components/grid/layout/GridRow.svelte @@ -31,7 +31,7 @@ on:focus on:mouseenter={$isDragging ? null : () => ($hoveredRowId = row._id)} on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)} - on:click={() => dispatch("row-click", row)} + on:click={() => dispatch("rowclick", row)} > {#each $renderedColumns as column, columnIdx (column.name)} {@const cellId = `${row._id}-${column.name}`} diff --git a/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte b/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte index e005a945dd..9f38841f7a 100644 --- a/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte +++ b/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte @@ -74,7 +74,7 @@ class="row" on:mouseenter={$isDragging ? null : () => ($hoveredRowId = row._id)} on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)} - on:click={() => dispatch("row-click", row)} + on:click={() => dispatch("rowclick", row)} > {#if $stickyColumn}