Close select after an option is clicked

This commit is contained in:
0x1eef 2024-05-19 21:51:30 -03:00
parent 488c13f45a
commit 5e202a01fd

View file

@ -32,7 +32,7 @@ function Select({ value, children: options, className }: Props) {
<li
key={key}
className={classNames({ hidden: isHidden })}
onClick={e => [e.stopPropagation(), setOpen(true)]}
onClick={e => [e.stopPropagation(), setOpen(!isOpen)]}
>
{n}
</li>