Skip to content
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

TextField no longer displays Clear button when AllowClear=true #861

Open
StepKie opened this issue Mar 20, 2025 · 1 comment
Open

TextField no longer displays Clear button when AllowClear=true #861

StepKie opened this issue Mar 20, 2025 · 1 comment

Comments

@StepKie
Copy link
Contributor

StepKie commented Mar 20, 2025

Reproduction branch:
https://github.com/StepKie/MauiPlayground/tree/uranium/textfield-clear-861
To reproduce, start typing into the first text field (clear icon does not show at the start in either case when initial Text is set directly in xaml, which might be the desired behavior, not sure)


Edit: Additional information: it depends on the exact combination of .net and UraniumUI.
A particular incompatibility seems introduced in UraniumUI 2.10.0:

TextField.ClearIcon:

DOES NOT SHOW: - .net9.0, UraniumUI nuget >=2.10.0 ( 2.10.0- 2.11.2 tested)
DOES SHOW - .net9.0, UraniumUI nuget <2.10.0 (2.7.4 - 2.9.1 tested)
DOES SHOW - .net8.0, UraniumUI latest nuget

TextField no longer shows ClearIcon when using net9.0

<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<ItemGroup>
	<PackageReference Include="CommunityToolkit.Maui" Version="11.1.0" />
	<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
	<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.50" />
	<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.50" />
	<PackageReference Include="UraniumUI.Material" Version="2.11.0" />
	<PackageReference Include="UraniumUI.Icons.MaterialIcons" Version="2.11.0" />
	<PackageReference Include="UraniumUI.Dialogs.CommunityToolkit" Version="2.11.0" />
	<PackageReference Include="UraniumUI.Validations.DataAnnotations" Version="2.11.0" />
</ItemGroup>

Code for this:

<VerticalStackLayout>
  <Label HorizontalOptions="Center" Text="Here, the first text field is not clearable:" />
  <material:TextField Title="Clearable TextField" AllowClear="True" Text="Test Text" />
  <material:TextField Title="Non-Clearable TextField" AllowClear="False" Text="Test Text" />
  <Label HorizontalOptions="Center" Text="For contrast, DatePicker is still clearable" />
  <material:DatePickerField Title="Clearable DatePicker" AllowClear="True" />
  <material:DatePickerField Title="Not-Clearable DatePicker" AllowClear="False" />
</VerticalStackLayout>

Image

@StepKie
Copy link
Contributor Author

StepKie commented Mar 21, 2025

@enisn This is really critical in my opinion. Any insight?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant