ListPickerDestination
public struct ListPickerDestination
extension ListPickerDestination: View
extension ListPickerDestination: _ViewEmptyChecking
ListPickerDestination is a view that provides a customizable list for ListPickerItem with selection, search filter and rows.
-
init(cancelAction:applyAction: selectedEntriesSectionTitle: selectAllAction: deselectAllAction: allEntriesSectionTitle: listPickerContent: prompt: componentIdentifier: ) Undocumented
Declaration
Swift
public init(@ViewBuilder cancelAction: () -> any View = { FioriButton { _ in Text("Cancel".localizedFioriString()) } }, @ViewBuilder applyAction: () -> any View = { FioriButton { _ in Text("Apply".localizedFioriString()) } }, @ViewBuilder selectedEntriesSectionTitle: () -> any View = { Text("Selected".localizedFioriString()) }, @ViewBuilder selectAllAction: () -> any View = { FioriButton { _ in Text("Select All".localizedFioriString()) } }, @ViewBuilder deselectAllAction: () -> any View = { FioriButton { _ in Text("Deselect All".localizedFioriString()) } }, @ViewBuilder allEntriesSectionTitle: () -> any View = { Text("All".localizedFioriString()) }, @ViewBuilder listPickerContent: () -> any View = { EmptyView() }, @ViewBuilder prompt: () -> any View = { EmptyView() }, componentIdentifier: String? = ListPickerDestination.identifier) -
Create a destination for
ListPickerItem.Declaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element, ID>, children: KeyPath<Data.Element, Data?>? = nil, selection: Binding<ID?>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )Parameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem.Declaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element, ID>, children: KeyPath<Data.Element, Data?>? = nil, selection: Binding<ID>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )Parameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionA binding to an ID which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem.Declaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element, ID>, children: KeyPath<Data.Element, Data?>? = nil, selections: Binding<Set<ID>?>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )Parameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem.Declaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element, ID>, children: KeyPath<Data.Element, Data?>? = nil, selections: Binding<Set<ID>>, allowEmpty: Bool = true, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )Parameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the non-optional selected items.
allowEmptyA boolean value to indicate to allow empty selections.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItemwith grouped sections. Need Data.Element is aListPickerSectionModelDeclaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element.Data.Element, ID>, children: KeyPath<Data.Element.Data.Element, Data.Element.Data?>? = nil, selection: Binding<ID?>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModelParameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItemwith grouped sections. Need Data.Element is aListPickerSectionModelDeclaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element.Data.Element, ID>, children: KeyPath<Data.Element.Data.Element, Data.Element.Data?>? = nil, selection: Binding<ID>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModelParameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionA binding to an ID which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItemwith grouped sections. Need Data.Element is aListPickerSectionModelDeclaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element.Data.Element, ID>, children: KeyPath<Data.Element.Data.Element, Data.Element.Data?>? = nil, selections: Binding<Set<ID>?>, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModelParameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the selected items.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItemwith grouped sections. Need Data.Element is aListPickerSectionModelDeclaration
Swift
init<Data: RandomAccessCollection, ID: Hashable>( _ data: Data, id: KeyPath<Data.Element.Data.Element, ID>, children: KeyPath<Data.Element.Data.Element, Data.Element.Data?>? = nil, selections: Binding<Set<ID>>, allowEmpty: Bool = true, isTrackingLiveChanges: Bool = true, prompt: AttributedString? = nil, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModelParameters
dataThe data for constructing the list picker.
idThe key path to the data model’s unique identifier.
childrenThe key path to the optional property of a data element whose value indicates the children of that element.
selectionsA binding to a set which stores the non-optional selected items.
allowEmptyA boolean value to indicate to allow empty selections.
isTrackingLiveChangesA boolean value to indicate to track the changes live or not.
promptAttributed text for prompt in destination view.
searchFilterThe closure to filter the
datain searching process. Request a boolean by the element and the filter key.rowContentThe view builder which returns the content of each row in the list picker.
-
Undocumented
Declaration
Swift
static let identifier: String -
init(cancelAction:applyAction: selectedEntriesSectionTitle: selectAllAction: deselectAllAction: allEntriesSectionTitle: listPickerContent: prompt: ) Undocumented
Declaration
Swift
init(cancelAction: FioriButton? = FioriButton { _ in Text("Cancel".localizedFioriString()) }, applyAction: FioriButton? = FioriButton { _ in Text("Apply".localizedFioriString()) }, selectedEntriesSectionTitle: AttributedString? = AttributedString("Selected".localizedFioriString()), selectAllAction: FioriButton? = FioriButton { _ in Text("Select All".localizedFioriString()) }, deselectAllAction: FioriButton? = FioriButton { _ in Text("Deselect All".localizedFioriString()) }, allEntriesSectionTitle: AttributedString? = AttributedString("All".localizedFioriString()), @ViewBuilder listPickerContent: () -> any View = { EmptyView() }, prompt: AttributedString? = nil) -
Undocumented
Declaration
Swift
init(_ configuration: ListPickerDestinationConfiguration) -
Declaration
Swift
@MainActor public var body: some View { get } -
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }