Skip to content

Commit d63668d

Browse files
committed
fix: 🐛 fix customization issue on Range Slider
1 parent f8210d1 commit d63668d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Apps/Examples/Examples/FioriSwiftUICore/Slider/SliderExample.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ struct RangeSliderExample: View {
245245
@State var disabledLowerValue: Double = 5.0
246246
@State var disabledUpperValue: Double = 20.0
247247

248+
@State var noLabelLowerValue: Double = 10.0
249+
@State var noLabelUpperValue: Double = 50.0
250+
248251
@State var customLowerValue: Double = 4
249252
@State var customUpperValue: Double = 16
250253

@@ -329,6 +332,15 @@ struct RangeSliderExample: View {
329332
description: "Disabled slider"
330333
).disabled(true)
331334

335+
FioriSlider(
336+
lowerValue: self.$noLabelLowerValue,
337+
upperValue: self.$noLabelUpperValue,
338+
description: AttributedString("Customized RangeSlider without leading and trailing view"),
339+
valueLabel: AttributedString("\(String(format: "%.0f", self.noLabelLowerValue)) - \(String(format: "%.0f", self.noLabelUpperValue))"),
340+
showsLeadingAccessory: false,
341+
showsTrailingAccessory: false
342+
)
343+
332344
let leadingLabel = getLetter(for: Int(self.customLowerValue))
333345
let trailingLabel = getLetter(for: Int(self.customUpperValue))
334346
let rangeFormat = (getLetter(for: 1), getLetter(for: 26))

Sources/FioriSwiftUICore/DataTypes/FioriSlider+DataType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ public extension FioriSlider {
192192
step: step,
193193
decimalPlaces: decimalPlaces,
194194
thumbHalfWidth: thumbHalfWidth,
195-
showsLowerThumb: showsLeadingAccessory,
196-
showsUpperThumb: showsTrailingAccessory,
195+
showsLowerThumb: true,
196+
showsUpperThumb: true,
197197
onRangeValueChange: onRangeValueChange,
198198
icon: { icon },
199199
description: theDescription,

0 commit comments

Comments
 (0)