From cff8360b145a0944f897a283e69244089eeb1f3d Mon Sep 17 00:00:00 2001 From: restaurantt Date: Wed, 20 Nov 2024 22:51:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20[IOSSDKBUG-447]SortFilter?= =?UTF-8?q?Item=20Reset=20button=20func=20(#893)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SortFilter/SortFilterExample.swift | 4 +- .../CancellableResettableForm.swift | 13 +-- .../DataTypes/SortFilter+DataType.swift | 45 ++++++++++- .../Models/ModelDefinitions.swift | 1 + .../Views/SearchListPickerItem+View.swift | 30 +++++-- .../FilterFeedbackBarItem+View.swift | 81 ++++++++++++++----- .../_SortFilterCFGItemContainer.swift | 25 +++++- .../SearchListPickerItem+API.generated.swift | 9 ++- .../API/SortFilterView+API.generated.swift | 2 +- 9 files changed, 168 insertions(+), 42 deletions(-) diff --git a/Apps/Examples/Examples/FioriSwiftUICore/SortFilter/SortFilterExample.swift b/Apps/Examples/Examples/FioriSwiftUICore/SortFilter/SortFilterExample.swift index 49bd0ac45..acf05527c 100644 --- a/Apps/Examples/Examples/FioriSwiftUICore/SortFilter/SortFilterExample.swift +++ b/Apps/Examples/Examples/FioriSwiftUICore/SortFilter/SortFilterExample.swift @@ -6,7 +6,9 @@ struct SortFilterExample: View { [ .switch(item: .init(name: "Favorite", value: true, icon: "heart.fill"), showsOnFilterFeedbackBar: true), .switch(item: .init(name: "Tagged", value: nil, icon: "tag"), showsOnFilterFeedbackBar: false), - .picker(item: .init(name: "List No Search", value: [0], valueOptions: ["Received", "Started", "Hold"], allowsMultipleSelection: true, allowsEmptySelection: true, barItemDisplayMode: .name, isSearchBarHidden: true, icon: "clock", itemLayout: .fixed, displayMode: .list), showsOnFilterFeedbackBar: true), + .picker(item: .init(name: "List Multiple", value: [0], valueOptions: ["Received", "Started", "Hold", "Transfer", "Completed"], allowsMultipleSelection: true, allowsEmptySelection: true, barItemDisplayMode: .name, isSearchBarHidden: true, icon: "clock", itemLayout: .fixed, displayMode: .list, resetButtonConfiguration: FilterFeedbackBarResetButtonConfiguration(with: .clearAll, title: "Clear")), showsOnFilterFeedbackBar: true), + .picker(item: .init(name: "List Single", value: [0], valueOptions: ["Received", "Started", "Hold", "Transfer", "Completed"], allowsMultipleSelection: false, allowsEmptySelection: true, barItemDisplayMode: .name, isSearchBarHidden: true, icon: "clock", itemLayout: .fixed, displayMode: .list, resetButtonConfiguration: FilterFeedbackBarResetButtonConfiguration(with: .clearAll)), showsOnFilterFeedbackBar: true), + .picker(item: .init(name: "List No Search", value: [0], valueOptions: ["Received", "Started", "Hold"], allowsMultipleSelection: false, allowsEmptySelection: true, barItemDisplayMode: .name, isSearchBarHidden: true, icon: "clock", itemLayout: .fixed, displayMode: .list), showsOnFilterFeedbackBar: true), .picker(item: .init(name: "List Status", value: [0], valueOptions: ["Received", "Started", "Hold", "Transfer", "Completed", "Pending Review Pending Pending Pending Pending Pending", "Accepted Medium", "Pending Medium", "Completed Medium"], allowsMultipleSelection: true, allowsEmptySelection: true, barItemDisplayMode: .name, icon: "clock", itemLayout: .fixed, displayMode: .list), showsOnFilterFeedbackBar: true), .picker(item: .init(name: "List Many Status", value: [0], valueOptions: ["Received", "Started", "Hold", "Transfer", "Completed", "Pending Review Pending Pending Pending Pending Pending", "Accepted Medium", "Pending Medium", "Completed Medium", "Checked", "Unchecked", "Partially Checked", "Checked and Unchecked", "Checked and Partially Checked", "Unchecked and Partially Checked", "Partially Checked and Unchecked", "Checked and Unchecked and Partially Checked", "Unchecked and Partially Checked and Partially Checked", "Partially Checked and Unchecked and Partially Checked", "Checked Finally", "Unchecked Finally", "Partially Checked Finally", "Checked and Unchecked Finally", "Checked and Partially Checked Finally", "Unchecked and Partially Checked Finally", "Partially Checked and Unchecked Finally", "Checked Finally and Partially Checked Finally", "Unchecked Finally and Partially Checked Finally", "Partially Checked Finally and Partially Checked Finally", "Review", "Reviewed", "To be Reviewed", "Pending for Review", "Booked", "To be Booked", "Will Book", "Booking Canceled"], allowsMultipleSelection: true, allowsEmptySelection: true, barItemDisplayMode: .value, icon: "clock", itemLayout: .fixed, displayMode: .list), showsOnFilterFeedbackBar: true), .picker(item: .init(name: "Flexible Filter", value: [0], valueOptions: ["Received", "Started", "Hold", "Transfer", "Completed", "Pending Review Pending Pending Pending Pending Pending", "Accepted Medium", "Pending", "Completed Medium"], allowsMultipleSelection: true, allowsEmptySelection: true, barItemDisplayMode: .nameAndValue, icon: "clock", itemLayout: .flexible, displayMode: .filterFormCell), showsOnFilterFeedbackBar: true), diff --git a/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift b/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift index 068a69493..45290f77a 100644 --- a/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift +++ b/Sources/FioriSwiftUICore/Components/CancellableResettableForm.swift @@ -27,13 +27,14 @@ struct CancellableResettableDialogForm Bool { + lhs.type == rhs.type && lhs.title == rhs.title && lhs.isHidden == rhs.isHidden + } +} + public extension SortFilterItem { /// Data structure for filter feedback, option list picker, struct PickerItem: Identifiable, Equatable { @@ -366,7 +398,9 @@ public extension SortFilterItem { /// If seachBar in list display mode is shown. Default is `false`. public var isSearchBarHidden: Bool = false var disableListEntriesSection: Bool = false - + var allowsDisplaySelectionCount: Bool = true + var resetButtonConfiguration: FilterFeedbackBarResetButtonConfiguration = .init() + /// Available OptionListPicker modes. Use this enum to define picker mode to present. public enum DisplayMode { /// Decided by options count @@ -402,7 +436,7 @@ public extension SortFilterItem { case disable } - public init(id: String = UUID().uuidString, name: String, value: [Int], valueOptions: [String], allowsMultipleSelection: Bool, allowsEmptySelection: Bool, barItemDisplayMode: BarItemDisplayMode = .name, isSearchBarHidden: Bool = false, icon: String? = nil, itemLayout: OptionListPickerItemLayoutType = .fixed, displayMode: DisplayMode = .automatic, listEntriesSectionMode: ListEntriesSectionMode = .default) { + public init(id: String = UUID().uuidString, name: String, value: [Int], valueOptions: [String], allowsMultipleSelection: Bool, allowsEmptySelection: Bool, barItemDisplayMode: BarItemDisplayMode = .name, isSearchBarHidden: Bool = false, icon: String? = nil, itemLayout: OptionListPickerItemLayoutType = .fixed, displayMode: DisplayMode = .automatic, listEntriesSectionMode: ListEntriesSectionMode = .default, allowsDisplaySelectionCount: Bool = true, resetButtonConfiguration: FilterFeedbackBarResetButtonConfiguration = FilterFeedbackBarResetButtonConfiguration()) { self.id = id self.name = name self.value = value @@ -425,6 +459,9 @@ public extension SortFilterItem { case .enable: self.disableListEntriesSection = false } + + self.allowsDisplaySelectionCount = allowsDisplaySelectionCount + self.resetButtonConfiguration = resetButtonConfiguration } mutating func onTap(option: String) { @@ -476,6 +513,10 @@ public extension SortFilterItem { self.workingValue = self.originalValue.map { $0 } } + mutating func clearAll() { + self.workingValue.removeAll() + } + mutating func apply() { self.value = self.workingValue.map { $0 } } diff --git a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift index 180aad8e4..5337f6408 100644 --- a/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift +++ b/Sources/FioriSwiftUICore/Models/ModelDefinitions.swift @@ -537,6 +537,7 @@ public protocol OptionListPickerItemModel: OptionListPickerComponent { // sourcery: virtualPropPopoverWidth = "let popoverWidth = 393.0" // sourcery: virtualPropKeyboardHeight = "@State var _keyboardHeight: CGFloat = 0.0" // sourcery: virtualPropDisableListEntriesSection = "var disableListEntriesSection: Bool = false" +// sourcery: virtualPropAllowsDisplaySelectionCount = "var allowsDisplaySelectionCount: Bool = true" public protocol SearchListPickerItemModel: OptionListPickerComponent { // sourcery: default.value = nil // sourcery: no_view diff --git a/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift b/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift index bba4cdf51..636c04cf1 100644 --- a/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift +++ b/Sources/FioriSwiftUICore/Views/SearchListPickerItem+View.swift @@ -13,7 +13,8 @@ public extension SearchListPickerItem { /// - selectAll: The closure when click 'Select All' button. /// - updateSearchListPickerHeight: The closure to update the parent view. /// - disableListEntriesSection: A boolean value to indicate to disable entries section or not. - init(value: Binding<[Int]>, valueOptions: [String] = [], hint: String? = nil, allowsMultipleSelection: Bool, allowsEmptySelection: Bool, isSearchBarHidden: Bool = false, disableListEntriesSection: Bool, onTap: ((_ index: Int) -> Void)? = nil, selectAll: ((_ isAll: Bool) -> Void)? = nil, updateSearchListPickerHeight: ((CGFloat) -> Void)? = nil) { + /// - allowsDisplaySelectionCount: A boolean value to indicate to display selection count or not. + init(value: Binding<[Int]>, valueOptions: [String] = [], hint: String? = nil, allowsMultipleSelection: Bool, allowsEmptySelection: Bool, isSearchBarHidden: Bool = false, disableListEntriesSection: Bool, allowsDisplaySelectionCount: Bool, onTap: ((_ index: Int) -> Void)? = nil, selectAll: ((_ isAll: Bool) -> Void)? = nil, updateSearchListPickerHeight: ((CGFloat) -> Void)? = nil) { self.init(value: value, valueOptions: valueOptions, hint: hint, onTap: onTap) self.allowsMultipleSelection = allowsMultipleSelection @@ -22,6 +23,7 @@ public extension SearchListPickerItem { self.selectAll = selectAll self.updateSearchListPickerHeight = updateSearchListPickerHeight self.disableListEntriesSection = disableListEntriesSection + self.allowsDisplaySelectionCount = allowsDisplaySelectionCount } } @@ -132,10 +134,24 @@ extension SearchListPickerItem: View { private func selectionHeader() -> some View { HStack { - Text(NSLocalizedString("Selected", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "")) - .foregroundStyle(Color.preferredColor(.secondaryLabel)) - .font(.fiori(forTextStyle: .subheadline, weight: .regular)) + if allowsDisplaySelectionCount { + Text(NSLocalizedString("Selected", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") + "(\(_value.count))") + .foregroundStyle(Color.preferredColor(.secondaryLabel)) + .font(.fiori(forTextStyle: .subheadline, weight: .regular)) + } else { + Text(NSLocalizedString("Selected", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "")) + .foregroundStyle(Color.preferredColor(.secondaryLabel)) + .font(.fiori(forTextStyle: .subheadline, weight: .regular)) + } + Spacer() + Button(action: { + selectAll?(false) + }) { + Text(NSLocalizedString("Deselect All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "")) + .foregroundStyle(Color.preferredColor(.tintColor)) + .font(.fiori(forTextStyle: .subheadline, weight: .regular)) + }.buttonStyle(PlainButtonStyle()) } .padding([.leading, .trailing], UIDevice.current.userInterfaceIdiom != .phone ? 13 : 16) .padding([.top, .bottom], 8) @@ -156,9 +172,11 @@ extension SearchListPickerItem: View { .font(.fiori(forTextStyle: .subheadline, weight: .regular)) Spacer() Button(action: { - selectAll?(_value.count != _valueOptions.count) + selectAll?(disableListEntriesSection && _value.count == _valueOptions.count ? false : true) }) { - Text(_value.count == _valueOptions.count ? NSLocalizedString("Deselect All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") : NSLocalizedString("Select All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "")) + Text(disableListEntriesSection && _value.count == _valueOptions.count ? + NSLocalizedString("Deselect All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "") : + NSLocalizedString("Select All", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: "")) .foregroundStyle(Color.preferredColor(.tintColor)) .font(.fiori(forTextStyle: .subheadline, weight: .regular)) }.buttonStyle(PlainButtonStyle()) diff --git a/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+View.swift b/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+View.swift index 999af68cc..8ce60a93e 100644 --- a/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+View.swift +++ b/Sources/FioriSwiftUICore/Views/SortFilter/FilterFeedbackBarItem+View.swift @@ -35,6 +35,14 @@ private extension View { } } +/// Enum for FilterFeedbackBar ResetButton Type. +public enum FilterFeedbackBarResetButtonType { + /// Reset to origin values. + case reset + /// Clear selected value, only effective for sinlge selection. + case clearAll +} + struct FilterFeedbackMenuItem: View { @Binding var item: SortFilterItem.PickerItem var onUpdate: () -> Void @@ -66,7 +74,7 @@ struct SliderMenuItem: View { @State var detentHeight: CGFloat = 0 var onUpdate: () -> Void - + public init(item: Binding, onUpdate: @escaping () -> Void) { self._item = item self.onUpdate = onUpdate @@ -124,7 +132,7 @@ struct PickerMenuItem: View { @State var detentHeight: CGFloat = ((UIDevice.current.userInterfaceIdiom == .phone || UIDevice.current.userInterfaceIdiom != .phone) ? 88 : 0) let popoverWidth = 393.0 @State var _keyboardHeight = 0.0 - + public init(item: Binding, onUpdate: @escaping () -> Void) { self._item = item self.onUpdate = onUpdate @@ -165,11 +173,19 @@ struct PickerMenuItem: View { }) .buttonStyle(CancelButtonStyle()) } resetAction: { - _Action(actionText: NSLocalizedString("Reset", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { - self.item.reset() - }) - .buttonStyle(ResetButtonStyle()) - .disabled(self.item.isOriginal) + if self.item.resetButtonConfiguration.isHidden { + EmptyView() + } else { + _Action(actionText: self.item.resetButtonConfiguration.title, didSelectAction: { + if self.item.resetButtonConfiguration.type == .reset { + self.item.reset() + } else { + self.item.clearAll() + } + }) + .buttonStyle(ResetButtonStyle()) + .disabled(self.resetButtonDisable()) + } } applyAction: { _Action(actionText: NSLocalizedString("Apply", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { self.item.apply() @@ -239,11 +255,19 @@ struct PickerMenuItem: View { }) .buttonStyle(CancelButtonStyle()) } resetAction: { - _Action(actionText: NSLocalizedString("Reset", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { - self.item.reset() - }) - .buttonStyle(ResetButtonStyle()) - .disabled(self.item.isOriginal) + if self.item.resetButtonConfiguration.isHidden { + EmptyView() + } else { + _Action(actionText: self.item.resetButtonConfiguration.title, didSelectAction: { + if self.item.resetButtonConfiguration.type == .reset { + self.item.reset() + } else { + self.item.clearAll() + } + }) + .buttonStyle(ResetButtonStyle()) + .disabled(self.resetButtonDisable()) + } } applyAction: { _Action(actionText: NSLocalizedString("Apply", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { self.item.apply() @@ -252,7 +276,7 @@ struct PickerMenuItem: View { }) .buttonStyle(ApplyButtonStyle()) } components: { - SearchListPickerItem(value: self.$item.workingValue, valueOptions: self.item.valueOptions, hint: nil, allowsMultipleSelection: self.item.allowsMultipleSelection, allowsEmptySelection: self.item.allowsEmptySelection, isSearchBarHidden: self.item.isSearchBarHidden, disableListEntriesSection: self.item.disableListEntriesSection) { index in + SearchListPickerItem(value: self.$item.workingValue, valueOptions: self.item.valueOptions, hint: nil, allowsMultipleSelection: self.item.allowsMultipleSelection, allowsEmptySelection: self.item.allowsEmptySelection, isSearchBarHidden: self.item.isSearchBarHidden, disableListEntriesSection: self.item.disableListEntriesSection, allowsDisplaySelectionCount: self.item.allowsDisplaySelectionCount) { index in self.item.onTap(option: self.item.valueOptions[index]) } selectAll: { isAll in self.item.selectAll(isAll) @@ -275,6 +299,14 @@ struct PickerMenuItem: View { .presentationDetents([.height(self.detentHeight + (self.item.isSearchBarHidden ? 0 : 52) + (self._keyboardHeight == 0 ? 56 : 0) + 93), .medium, .large]) } } + + private func resetButtonDisable() -> Bool { + if self.item.resetButtonConfiguration.type == .reset { + return self.item.isOriginal + } else { + return self.item.workingValue.isEmpty + } + } } struct HeightPreferenceKey: PreferenceKey { @@ -318,7 +350,7 @@ struct DateTimeMenuItem: View { #else let popoverWidth = 480.0 #endif - + public init(item: Binding, onUpdate: @escaping () -> Void) { self._item = item self.onUpdate = onUpdate @@ -551,6 +583,8 @@ struct FullCFGMenuItem: View { var onUpdate: () -> Void + var resetButtonType = FilterFeedbackBarResetButtonType.reset + public init(items: Binding<[[SortFilterItem]]>, onUpdate: @escaping () -> Void) { self._items = items self.onUpdate = onUpdate @@ -575,22 +609,29 @@ struct FullCFGMenuItem: View { }, cancelAction: { _Action(actionText: NSLocalizedString("Cancel", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { - // item.apply() - self.onUpdate() - self.isSheetVisible.toggle() + self.isSheetVisible = false }) .buttonStyle(CancelButtonStyle()) }, resetAction: { _Action(actionText: NSLocalizedString("Reset", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { - // item.cancel() - self.isSheetVisible.toggle() + for r in 0 ..< self.items.count { + for c in 0 ..< self.items[r].count { + self.items[r][c].reset() + } + } }) .buttonStyle(ResetButtonStyle()) }, applyAction: { _Action(actionText: NSLocalizedString("Apply", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), didSelectAction: { - // item.reset() + for r in 0 ..< self.items.count { + for c in 0 ..< self.items[r].count { + self.items[r][c].apply() + } + } + self.onUpdate() + self.isSheetVisible = false }) .buttonStyle(ApplyButtonStyle()) }, diff --git a/Sources/FioriSwiftUICore/Views/SortFilter/_SortFilterCFGItemContainer.swift b/Sources/FioriSwiftUICore/Views/SortFilter/_SortFilterCFGItemContainer.swift index 4b368b0e5..1ce7a0dd5 100644 --- a/Sources/FioriSwiftUICore/Views/SortFilter/_SortFilterCFGItemContainer.swift +++ b/Sources/FioriSwiftUICore/Views/SortFilter/_SortFilterCFGItemContainer.swift @@ -10,7 +10,7 @@ import SwiftUI /// :nodoc: public struct _SortFilterCFGItemContainer { @EnvironmentObject var context: SortFilterContext - + @Binding var _items: [[SortFilterItem]] @State var height = 88.0 @@ -152,7 +152,8 @@ extension _SortFilterCFGItemContainer: View { allowsMultipleSelection: self._items[r][c].picker.allowsMultipleSelection, allowsEmptySelection: self._items[r][c].picker.allowsEmptySelection, isSearchBarHidden: self._items[r][c].picker.isSearchBarHidden, - disableListEntriesSection: self._items[r][c].picker.disableListEntriesSection + disableListEntriesSection: self._items[r][c].picker.disableListEntriesSection, + allowsDisplaySelectionCount: self._items[r][c].picker.allowsDisplaySelectionCount ) { index in self._items[r][c].picker.onTap(option: self._items[r][c].picker.valueOptions[index]) } selectAll: { isAll in @@ -169,6 +170,26 @@ extension _SortFilterCFGItemContainer: View { .ifApply(UIDevice.current.userInterfaceIdiom == .pad, content: { v in v.frame(height: self.searchListHeight) }) + .ifApply(!self._items[r][c].picker.resetButtonConfiguration.isHidden, content: { v in + v.toolbar { + let item = self._items[r][c].picker + ToolbarItem(placement: .navigationBarTrailing) { + if item.resetButtonConfiguration.isHidden { + EmptyView() + } else { + _Action(actionText: item.resetButtonConfiguration.title, didSelectAction: { + if item.resetButtonConfiguration.type == .reset { + self._items[r][c].picker.reset() + } else { + self._items[r][c].picker.clearAll() + } + }) + .buttonStyle(ResetButtonStyle()) + .disabled(item.resetButtonConfiguration.type == .reset ? item.isOriginal : item.workingValue.isEmpty) + } + } + } + }) .onReceive(NotificationCenter.default.publisher(for: UIApplication.keyboardDidShowNotification)) { notif in let rect = (notif.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect) ?? .zero self._keyboardHeight = rect.height diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchListPickerItem+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchListPickerItem+API.generated.swift index 2c5993c6f..e01929449 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchListPickerItem+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SearchListPickerItem+API.generated.swift @@ -12,15 +12,16 @@ public struct SearchListPickerItem { var disableListEntriesSection: Bool = false var updateSearchListPickerHeight: ((CGFloat) -> ())? = nil + var selectAll: ((Bool) -> ())? = nil + let popoverWidth = 393.0 @State var _height: CGFloat = 44 + @State var _searchViewCornerRadius: CGFloat = 18 + @State var _searchText: String = "" var allowsEmptySelection: Bool = false var allowsMultipleSelection: Bool = false + var allowsDisplaySelectionCount: Bool = true var isSearchBarHidden: Bool = false - @State var _searchText: String = "" - let popoverWidth = 393.0 - var selectAll: ((Bool) -> ())? = nil @State var _keyboardHeight: CGFloat = 0.0 - @State var _searchViewCornerRadius: CGFloat = 18 public init(model: SearchListPickerItemModel) { self.init(value: Binding<[Int]>(get: { model.value }, set: { model.value = $0 }), valueOptions: model.valueOptions, hint: model.hint, onTap: model.onTap) diff --git a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SortFilterView+API.generated.swift b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SortFilterView+API.generated.swift index 9c74b2357..d128eaa64 100644 --- a/Sources/FioriSwiftUICore/_generated/ViewModels/API/SortFilterView+API.generated.swift +++ b/Sources/FioriSwiftUICore/_generated/ViewModels/API/SortFilterView+API.generated.swift @@ -17,8 +17,8 @@ public struct SortFilterView Void)? @State var size: CGSize = .zero - @StateObject var context: SortFilterContext = SortFilterContext() let popoverWidth = 393.0 + @StateObject var context: SortFilterContext = SortFilterContext() private var isModelInit: Bool = false private var isCancelActionNil: Bool = false