SolidJSS
SolidJSโ€ข4y agoโ€ข
6 replies
Tur

How to set delay on signal's setter

Hello! I'm trying to set a delay between mouseover and then menu opening. The menu is opened depending on signal state
<li>on:mouseover={ setDropdownVisible('block') }</li>
Once dropdownVisible() has set I set style display block on the menu
I try to create the delay like this :
<li>on:mouseover={ setTimeout(setDropdownVisible('block'), 1000) }</li>
and it doesn't work. I guess this is a wrong way but what is right one and why?
Was this page helpful?