Fix selected option removal.

This commit is contained in:
Madeorsk 2024-07-13 16:48:18 +02:00
parent 8904ed741c
commit 334a311c9e
Signed by: Madeorsk
SSH key fingerprint: SHA256:J9G0ofIOLKf7kyS2IfrMqtMaPdfsk1W02+oGueZzDDU

View file

@ -214,7 +214,7 @@ export function Select<OptionKey extends keyof any, Option>(
<li key={String(optionKey)}>
<Check />
<div className={"option"}>{(renderOption ?? defaultRenderOption)(option)}</div>
<button className={"remove flat"} type={"button"} onClick={() => handleDeselectedOption(optionKey)}>
<button className={"remove flat"} type={"button"} onMouseDown={() => handleDeselectedOption(optionKey)}>
<X />
</button>
</li>