fix: show number labels consistently for current item in variant popover
When an item is the current selection, show the number gutter instead of replacing it with the ● bullet, so users always see which key to press. https://claude.ai/code/session_011xS58qyP1BjcuCrJcWPxQBpull/20058/head
parent
0b6d955560
commit
8bff03f833
|
|
@ -321,12 +321,14 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
|||
const gutter = createMemo(() => {
|
||||
if (numberLabel()) {
|
||||
return (
|
||||
<text
|
||||
fg={active() ? selectedForeground(theme) : theme.textMuted}
|
||||
flexShrink={0}
|
||||
>
|
||||
{numberLabel()}
|
||||
</text>
|
||||
<box flexDirection="row" flexShrink={0}>
|
||||
<text
|
||||
fg={active() ? selectedForeground(theme) : current() ? theme.primary : theme.textMuted}
|
||||
flexShrink={0}
|
||||
>
|
||||
{numberLabel()}
|
||||
</text>
|
||||
</box>
|
||||
)
|
||||
}
|
||||
return option.gutter
|
||||
|
|
@ -407,16 +409,16 @@ function Option(props: {
|
|||
|
||||
return (
|
||||
<>
|
||||
<Show when={props.current}>
|
||||
<text flexShrink={0} fg={props.active ? fg : props.current ? theme.primary : theme.text} marginRight={0}>
|
||||
●
|
||||
</text>
|
||||
</Show>
|
||||
<Show when={!props.current && props.gutter}>
|
||||
<Show when={props.gutter}>
|
||||
<box flexShrink={0} marginRight={0}>
|
||||
{props.gutter}
|
||||
</box>
|
||||
</Show>
|
||||
<Show when={props.current && !props.gutter}>
|
||||
<text flexShrink={0} fg={props.active ? fg : props.current ? theme.primary : theme.text} marginRight={0}>
|
||||
●
|
||||
</text>
|
||||
</Show>
|
||||
<text
|
||||
flexGrow={1}
|
||||
fg={props.active ? fg : props.current ? theme.primary : theme.text}
|
||||
|
|
|
|||
Loading…
Reference in New Issue