1 Commits

Author SHA1 Message Date
a1cc9dec99 Fix text bug dropdown (#56)
All checks were successful
Game Ideas deploy / build-test-deploy (push) Successful in 1m33s
Reviewed-on: #56
2025-05-18 17:05:40 +02:00
3 changed files with 9 additions and 2 deletions

View File

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

View File

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

View File

@@ -22,7 +22,7 @@ public class GlobalConstants
public const int API_PORT = 8000; public const int API_PORT = 8000;
public const string SUB_DOMAIN_NAME = "api-"; public const string SUB_DOMAIN_NAME = "api-";
public const double DELAY_INPUT_MS = 500; public const double DELAY_INPUT_MS = 450;
public const int MAX_DESCRIPTION_LENGTH = 350; public const int MAX_DESCRIPTION_LENGTH = 350;
} }