While experimenting with PR #19 by @Saik0s, I've found a bug which results in SettingPicker component not rendering the icon, as it should. This happens when used in combination with ChoicesConfiguration.pickerDisplayMode(.menu) instead of revolving around default .navigation display mode, which works.
Bug Reproduction
To reproduce this bug and make icon not showing use the following code (notably choiceConfiguration: (...) constructor param:
// ...
struct SomeView: View {
@AppStorage("pickerIndex") var pickerIndex = 0
var body: some View {
// ...
SettingGroup(header: "Text Appearance", footer: "Use this settings to customize text rendering styles.") {
SettingPicker(
icon: .system(icon: "textformat.subscript", backgroundColor: .pink),
title: "Example Picker",
choices: ["Default", "Gradient", "Image based"],
selectedIndex: $pickerIndex,
choicesConfiguration: .init(pickerDisplayMode: .menu) /** bug produced by this line */
)
}
}
}
Example of working code when the icon is shown, using .navigation display mode instead:
// ...
SettingGroup(header: "...", footer: "...") {
SettingPicker(
// ...
choicesConfiguration: .init(pickerDisplayMode: .navigation)
)
}
Rendered Results
Left side is working example when using .navigation display mode, while the right side is showing bugged version. The important item is the "Vehicle Model" settings (last item).
While experimenting with PR #19 by @Saik0s, I've found a bug which results in
SettingPickercomponent not rendering the icon, as it should. This happens when used in combination withChoicesConfiguration.pickerDisplayMode(.menu)instead of revolving around default.navigationdisplay mode, which works.Bug Reproduction
To reproduce this bug and make icon not showing use the following code (notably
choiceConfiguration: (...)constructor param:Example of working code when the icon is shown, using
.navigationdisplay mode instead:Rendered Results
Left side is working example when using
.navigationdisplay mode, while the right side is showing bugged version. The important item is the "Vehicle Model" settings (last item).