2 Commits

Author SHA1 Message Date
65b4ea9476 Fix merge
All checks were successful
Game Ideas build for PR / build_test (pull_request) Successful in 38s
2025-05-18 16:59:59 +02:00
163a251579 fix select bugs 2025-05-18 16:59:30 +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;
} }