Fix text bug dropdown (#56)
All checks were successful
Game Ideas deploy / build-test-deploy (push) Successful in 1m33s

Reviewed-on: #56
This commit was merged in pull request #56.
This commit is contained in:
2025-05-18 17:05:40 +02:00
parent 1baa2a73fe
commit a1cc9dec99
3 changed files with 9 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
placeholder="@Placeholder"
disabled="@IsDisable"
style="@(IsDisable ? "pointer-events: none" : "")"
onClick="this.select();"
@bind=@Text
@bind:event="oninput"
@bind:after="HandleTextChanged"

View File

@@ -55,7 +55,8 @@ public partial class SelectSearch<TItem>
{
Values = [];
Select?.Close();
await ValuesChanged.InvokeAsync([.. Values]);
SearchInput?.SetText(string.Empty);
await ValuesChanged.InvokeAsync([]);
}
private void HandleFocusIn()
@@ -80,5 +81,10 @@ public partial class SelectSearch<TItem>
))
.ThenBy(game => SelectParams.GetItemLabel(game).Length)];
}
else
{
SelectParams.Items = Items;
SearchInput?.SetText(string.Join(", ", Values?.Select(GetLabel) ?? []));
}
}
}