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: ) 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() })
-
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, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The 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, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selection
A binding to an ID which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The 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, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The 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, searchFilter: ((Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element) -> some View )
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the non-optional selected items.
allowEmpty
A boolean value to indicate to allow empty selections.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem
with grouped sections. Need Data.Element is aListPickerSectionModel
Declaration
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, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModel
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem
with grouped sections. Need Data.Element is aListPickerSectionModel
Declaration
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, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModel
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selection
A binding to an ID which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem
with grouped sections. Need Data.Element is aListPickerSectionModel
Declaration
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, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModel
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the selected items.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The view builder which returns the content of each row in the list picker.
-
Create a destination for
ListPickerItem
with grouped sections. Need Data.Element is aListPickerSectionModel
Declaration
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, searchFilter: ((Data.Element.Data.Element, String) -> Bool)? = nil, @ViewBuilder rowContent: @escaping (Data.Element.Data.Element) -> some View ) where Data.Element: ListPickerSectionModel
Parameters
data
The data for constructing the list picker.
id
The key path to the data model’s unique identifier.
children
The key path to the optional property of a data element whose value indicates the children of that element.
selections
A binding to a set which stores the non-optional selected items.
allowEmpty
A boolean value to indicate to allow empty selections.
isTrackingLiveChanges
A boolean value to indicate to track the changes live or not.
searchFilter
The closure to filter the
data
in searching process. Request a boolean by the element and the filter key.rowContent
The view builder which returns the content of each row in the list picker.
-
init(cancelAction:
applyAction: selectedEntriesSectionTitle: selectAllAction: deselectAllAction: allEntriesSectionTitle: listPickerContent: ) 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() })
-
Undocumented
Declaration
Swift
init(_ configuration: ListPickerDestinationConfiguration)
-
Declaration
Swift
public var body: some View { get }
-
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }