Skip to content

Commit

Permalink
Merge pull request #4087 from vishaljoshi789/#4083
Browse files Browse the repository at this point in the history
Added allow users to hover over record-level error messages
  • Loading branch information
seancolsen authored Dec 18, 2024
2 parents 579ba44 + 52d597e commit cf3ddd4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mathesar_ui/src/systems/table-view/row/CellErrors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@
let errorIndicatorElement: SVGSVGElement | undefined;
let cellElementIsHovered = false;
let hiderTimeoutId: number;
function setHover() {
window.clearTimeout(hiderTimeoutId);
cellElementIsHovered = true;
}
function unsetHover() {
cellElementIsHovered = false;
hiderTimeoutId = window.setTimeout(() => {
cellElementIsHovered = false;
}, 1);
}
onMount(() => {
const cell = errorIndicatorElement?.parentElement;
Expand Down Expand Up @@ -47,6 +52,8 @@
reference: cellElement,
options: { placement: 'top-start' },
}}
on:mouseenter={() => setHover()}
on:mouseleave={() => unsetHover()}
>
{errors.join(' ')}
</div>
Expand Down

0 comments on commit cf3ddd4

Please sign in to comment.