From 1716321bef13753648c216733b0b753c047c3847 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 1 Apr 2024 17:14:18 +0100 Subject: [PATCH] wip --- packages/bbui/src/Form/Core/Picker.svelte | 10 ++- packages/bbui/src/Tooltip/Context.svelte | 105 ++++++++++++---------- 2 files changed, 66 insertions(+), 49 deletions(-) diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index fa0325e690..87827dabbf 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -17,6 +17,7 @@ TooltipType, } from "../../Tooltip/AbsTooltip.svelte" import ContextTooltip from "../../Tooltip/Context.svelte" + import { fade } from 'svelte/transition'; export let id = null @@ -59,6 +60,7 @@ let contextTooltipId = 0; let contextTooltipAnchor = null let contextTooltipOption = null + let previousContextTooltipOption = null let contextTooltipVisible = false $: sortedOptions = getSortedOptions(options, getOptionLabel, sort) @@ -124,10 +126,9 @@ setTimeout(() => { if (contextTooltipId === invokedContextTooltipId) { contextTooltipAnchor = e.target; + previousContextTooltipOption = contextTooltipOption; contextTooltipOption = option; contextTooltipVisible = true; - } else { - console.log("not long enough"); } }, 200) } @@ -307,6 +308,11 @@ > {contextTooltipOption} +
+ {previousContextTooltipOption} +