fix: restore visibility select behavior
This commit is contained in:
@@ -60,9 +60,8 @@
|
|||||||
<div class="chip-toolbar">
|
<div class="chip-toolbar">
|
||||||
<label class="visibility-control" for="roll-visibility">Visibility</label>
|
<label class="visibility-control" for="roll-visibility">Visibility</label>
|
||||||
<select id="roll-visibility"
|
<select id="roll-visibility"
|
||||||
@bind:get="NormalizedRollVisibility"
|
value="@(RollVisibility == "private" ? "private" : "public")"
|
||||||
@bind:set="OnRollVisibilityChangedAsync"
|
@onchange="OnRollVisibilityChangedAsync">
|
||||||
@bind:event="oninput">
|
|
||||||
<option value="public">Public</option>
|
<option value="public">Public</option>
|
||||||
<option value="private">Private</option>
|
<option value="private">Private</option>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -70,9 +70,10 @@ public partial class CharacterPanel
|
|||||||
await SkillUpdated.InvokeAsync(skillId);
|
await SkillUpdated.InvokeAsync(skillId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnRollVisibilityChangedAsync(string? selectedVisibility)
|
private async Task OnRollVisibilityChangedAsync(ChangeEventArgs args)
|
||||||
{
|
{
|
||||||
await RollVisibilityChanged.InvokeAsync(selectedVisibility ?? "public");
|
var selectedVisibility = args.Value?.ToString() ?? "public";
|
||||||
|
await RollVisibilityChanged.InvokeAsync(selectedVisibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RollSkillAsync(CharacterSheetSkill skill)
|
private async Task RollSkillAsync(CharacterSheetSkill skill)
|
||||||
@@ -371,9 +372,6 @@ public partial class CharacterPanel
|
|||||||
|
|
||||||
[Parameter] public EventCallback<string> RollVisibilityChanged { get; set; }
|
[Parameter] public EventCallback<string> RollVisibilityChanged { get; set; }
|
||||||
|
|
||||||
private string NormalizedRollVisibility =>
|
|
||||||
string.Equals(RollVisibility, "private", StringComparison.OrdinalIgnoreCase) ? "private" : "public";
|
|
||||||
|
|
||||||
[Parameter] public Func<Guid, string> OwnerLabel { get; set; } = _ => string.Empty;
|
[Parameter] public Func<Guid, string> OwnerLabel { get; set; } = _ => string.Empty;
|
||||||
|
|
||||||
[Parameter] public Func<CharacterSheetSkill, string> SkillDefinitionLabel { get; set; } = _ => string.Empty;
|
[Parameter] public Func<CharacterSheetSkill, string> SkillDefinitionLabel { get; set; } = _ => string.Empty;
|
||||||
|
|||||||
Reference in New Issue
Block a user