ValuePicker
ValuePicker
provides a title and value label with Fiori styling and a wheel-stylePicker
.
Usage
let valueOptions :[AttributedString] = ["1", "20", "300"]
@State var selectedIndex: Int = 0
@State var isRequired = false
@State var stateIndex: Int = 0
@State var isTrackingLiveChanges = true
@State var showsErrorMessage = false
ValuePicker(title: "Picker Title(Default Style)", isRequired: self.isRequired, options: self.valueOptions, selectedIndex: self.$selectedIndex, isTrackingLiveChanges: self.isTrackingLiveChanges)
.informationView(isPresented: self.$showsErrorMessage, description: AttributedString("Please choose one available data"))
.informationViewStyle(.informational)
-
init(title:
valueLabel: mandatoryFieldIndicator: isRequired: options: selectedIndex: isTrackingLiveChanges: alwaysShowPicker: controlState: ) Undocumented
Declaration
Swift
public init(@ViewBuilder title: () -> any View, @ViewBuilder valueLabel: () -> any View = { EmptyView() }, @ViewBuilder mandatoryFieldIndicator: () -> any View = { Text("*") }, isRequired: Bool = false, options: [AttributedString] = [], selectedIndex: Binding<Int>, isTrackingLiveChanges: Bool = true, alwaysShowPicker: Bool = false, controlState: ControlState = .normal)
-
init(title:
valueLabel: mandatoryFieldIndicator: isRequired: options: selectedIndex: isTrackingLiveChanges: alwaysShowPicker: controlState: ) Undocumented
Declaration
Swift
init(title: AttributedString, valueLabel: AttributedString? = nil, mandatoryFieldIndicator: TextOrIcon? = .text("*"), isRequired: Bool = false, options: [AttributedString] = [], selectedIndex: Binding<Int>, isTrackingLiveChanges: Bool = true, alwaysShowPicker: Bool = false, controlState: ControlState = .normal)
-
Undocumented
Declaration
Swift
init(_ configuration: ValuePickerConfiguration)
-
Declaration
Swift
public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }