Skip to content

Commit

Permalink
Added allow users to hover over record-level error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vishaljoshi789 committed Dec 17, 2024
1 parent f157aed commit 17ac660
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mathesar_ui/src/systems/table-view/row/CellErrors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@
let errorIndicatorElement: SVGSVGElement | undefined;
let cellElementIsHovered = false;
let hideTimeout: number;
function setHover() {
clearTimeout(hideTimeout);
cellElementIsHovered = true;
}
function unsetHover() {
cellElementIsHovered = false;
hideTimeout = setTimeout(() => {
cellElementIsHovered = false;
}, 1);
}
onMount(() => {
const cell = errorIndicatorElement?.parentElement;
Expand Down Expand Up @@ -47,6 +53,8 @@
reference: cellElement,
options: { placement: 'top-start' },
}}
on:mouseenter={() => setHover()}
on:mouseleave={() => unsetHover()}
>
{errors.join(' ')}
</div>
Expand Down

0 comments on commit 17ac660

Please sign in to comment.