fix: tui list jank issue (#25219)

This commit is contained in:
Aiden Cline
2026-04-30 22:45:41 -05:00
committed by GitHub
parent 461e7345b3
commit 33f7f593ee
3 changed files with 5 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ export function createDialogProviderOptions() {
}[provider.id], }[provider.id],
footer: consoleManaged ? sync.data.console_state.activeOrgName : undefined, footer: consoleManaged ? sync.data.console_state.activeOrgName : undefined,
category: provider.id in PROVIDER_PRIORITY ? "Popular" : "Other", category: provider.id in PROVIDER_PRIORITY ? "Popular" : "Other",
gutter: connected && onboarded() ? <text fg={theme.success}></text> : undefined, gutter: connected && onboarded() ? () => <text fg={theme.success}></text> : undefined,
async onSelect() { async onSelect() {
if (consoleManaged) return if (consoleManaged) return

View File

@@ -168,7 +168,7 @@ export function DialogSessionList() {
value: x.id, value: x.id,
category, category,
footer, footer,
gutter: isWorking ? <Spinner /> : undefined, gutter: isWorking ? () => <Spinner /> : undefined,
} }
}) })
}) })

View File

@@ -42,7 +42,7 @@ export interface DialogSelectOption<T = any> {
categoryView?: JSX.Element categoryView?: JSX.Element
disabled?: boolean disabled?: boolean
bg?: RGBA bg?: RGBA
gutter?: JSX.Element gutter?: () => JSX.Element
margin?: JSX.Element margin?: JSX.Element
onSelect?: (ctx: DialogContext) => void onSelect?: (ctx: DialogContext) => void
} }
@@ -407,7 +407,7 @@ function Option(props: {
active?: boolean active?: boolean
current?: boolean current?: boolean
footer?: JSX.Element | string footer?: JSX.Element | string
gutter?: JSX.Element gutter?: () => JSX.Element
onMouseOver?: () => void onMouseOver?: () => void
}) { }) {
const { theme } = useTheme() const { theme } = useTheme()
@@ -422,7 +422,7 @@ function Option(props: {
</Show> </Show>
<Show when={!props.current && props.gutter}> <Show when={!props.current && props.gutter}>
<box flexShrink={0} marginRight={0}> <box flexShrink={0} marginRight={0}>
{props.gutter} {props.gutter?.()}
</box> </box>
</Show> </Show>
<text <text