Skip to content

PickerScaffold: description uses title instead of description #21

Description

@landrix

Bug Description

When a description is provided, the title is rendered twice while the description is never displayed. The Text composable incorrectly uses title instead of description inside the description?.let { ... } block. This results in incorrect UI rendering for all picker items with descriptions.

Location
File: shared/src/commonMain/kotlin/com/multiplatformkickstarter/app/ui/components/Picker.kt

// Incorrect line:
description?.let {
    Text(
        text = title, // ← should be 'description'
        style = Typography.get().bodyMedium,
        modifier = Modifier.padding(start = 16.dp)
    )
}

Fix

Replace text = title with text = description at this line.

Quickfix:

description?.let {
    Text(
        text = it,
        style = Typography.get().bodyMedium,
        modifier = Modifier.padding(start = 16.dp)
    )
}

Note: This is a 1-line fix but affects correct UI rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions