Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codymullins committed Jul 10, 2024
1 parent 3001a4f commit e585695
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Pure.Blazor.Components/Buttons/PureButtonBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected void OnClicked(MouseEventArgs e)
return;
}

OnClick.InvokeAsync();
OnClick.InvokeAsync(e);
}

protected override void BuildCss()
Expand Down
8 changes: 4 additions & 4 deletions src/Pure.Blazor.Components/Common/Keyboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public static KeyboardDirection ToKeyboardDirection(this KeyboardEventArgs e)
{
return e.Key switch
{
ArrowLeft => KeyboardDirection.Left,
ArrowRight => KeyboardDirection.Right,
ArrowLeft => KeyboardDirection.Backward,
ArrowRight => KeyboardDirection.Forward,
ArrowUp => KeyboardDirection.Up,
ArrowDown => KeyboardDirection.Down,
_ => throw new ArgumentOutOfRangeException(nameof(e))
Expand All @@ -45,6 +45,6 @@ public enum KeyboardDirection
{
Up,
Down,
Left,
Right
Backward,
Forward
}
8 changes: 4 additions & 4 deletions src/Pure.Blazor.Components/Layout/PureTabs.razor
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
var currentIndex = Tabs.IndexOf(CurrentTab);
var nextIndex = direction switch
{
KeyboardDirection.Left when currentIndex > 0 => currentIndex - 1,
KeyboardDirection.Right when currentIndex < Tabs.Count - 1 => currentIndex + 1,
KeyboardDirection.Left when useEndlessTabCycle => Tabs.Count - 1,
KeyboardDirection.Right when useEndlessTabCycle => 0,
KeyboardDirection.Backward when currentIndex > 0 => currentIndex - 1,
KeyboardDirection.Forward when currentIndex < Tabs.Count - 1 => currentIndex + 1,
KeyboardDirection.Backward when useEndlessTabCycle => Tabs.Count - 1,
KeyboardDirection.Forward when useEndlessTabCycle => 0,
_ => currentIndex
};

Expand Down

0 comments on commit e585695

Please sign in to comment.