-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: picker crash #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In response to the /v1/account/registration/
API, we're consistently receiving an empty element.
{
"value": "",
"name": "--",
"default": true
}
Considering this, we could simplify the solution to a single line change.
let filteredItems = items.filter { $0.value.localizedCaseInsensitiveContains(search) }
return filteredItems.isEmpty ? [PickerItem(key: "", value: "")] : filteredItem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, i saw that, but just noticed that this PickerView is using from different places.. from subtitles view for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Co-authored-by: Vadim Kuznetsov <[email protected]>
this PR fix crash when after filter applying
PickerView
crash withindex out of bounds
error.