This repository was archived by the owner on May 1, 2024. It is now read-only.
Replies: 1 comment 4 replies
-
Thank you for pointing this out. It certainly looks like a bug to me! Would you be willing to raise it as a bug? I would suggest we end up with 2 converters 1 to cover the existing white space check and one that does not. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the
IsNullOrEmptyConverter
in my project to show a UI element when an input string is null or empty, but when I enter whitespace characters only, the UI element is still visible.So I looked at the source code, and to my surprise, the converter is implemented using
string.IsNullOrWhiteSpace
:https://github.com/xamarin/XamarinCommunityToolkit/blob/main/src/CommunityToolkit/Xamarin.CommunityToolkit/Converters/IsNullOrEmptyConverter.shared.cs#L24
I'm not sure if that is the correct intention of the code. If it is, then the converter should be renamed to IsNullOrWhitespaceConverter.
Beta Was this translation helpful? Give feedback.
All reactions