+
{o.icon && }
{tx(o.label)}
@@ -174,11 +234,13 @@ export function Select({
o.value}
+ getKey={(o) => `${o.section ? "section" : "option"}:${o.value}`}
isSection={isSection}
renderSection={(o) => {tx(o.label)}}
- activeIndex={active}
- onActiveChange={setActive}
+ activeIndex={activeIndex}
+ onActiveChange={(i) => {
+ if (!unavailable(filtered[i]!)) setActive(i);
+ }}
onActivate={(o) => choose(o)}
focusable={false}
hoverSelects
@@ -186,7 +248,10 @@ export function Select({
aria-label={tx(aria["aria-label"])}
className={styles.list}
renderItem={(o) => (
- <>
+
{o.value === value && }
{o.icon && }
{tx(o.label)}
@@ -195,7 +260,7 @@ export function Select({
{tx(o.detail)}
)}
- >
+
)}
/>