Skip to content

Commit ae63864

Browse files
committed
Add temporary solution to preselect custom option
1 parent ff2b852 commit ae63864

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Analytics Hub/AnalyticsTimeRangeCard.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,14 @@ struct AnalyticsTimeRangeCard: View {
9999
private func internalSelectionBinding() -> Binding<AnalyticsHubTimeRangeSelection.SelectionType> {
100100
.init(
101101
get: {
102-
selectionType
102+
// Temporary
103+
switch selectionType {
104+
// If a `custom` case is set return one with nil values so the Custom row is selected
105+
case .custom:
106+
return .custom(start: nil, end: nil)
107+
default:
108+
return selectionType
109+
}
103110
},
104111
set: { newValue in
105112
switch newValue {

0 commit comments

Comments
 (0)