From a285c6dcb7821c0506a8c5655102aa525eef4f08 Mon Sep 17 00:00:00 2001 From: Adam Sparks Date: Thu, 5 Jun 2025 08:54:06 -0700 Subject: [PATCH] prevent option click from bubbling and causing list re-open --- src/select.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/select.tsx b/src/select.tsx index 1aabb8d..fd2bfd4 100644 --- a/src/select.tsx +++ b/src/select.tsx @@ -301,7 +301,11 @@ const Option: ParentComponent = (props) => { data-disabled={select.isOptionDisabled(props.option)} data-focused={select.isOptionFocused(props.option)} class="solid-select-option" - onClick={() => select.pickOption(props.option)} + onClick={(e) => { + e.stopPropagation(); + e.preventDefault(); + select.pickOption(props.option); + }} > {props.children}