Blazor Server: EventCallback on child pagination component does not invoke parent handler in specific page context
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
## Describe the bug
In a Blazor Server app, a reusable child pagination component exposes EventCallback parameters (OnPrevious/OnNext).
In one specific page context, clicking the child component buttons does not change parent page state (parent handlers aren't effectively executing).
If the same markup is inlined directly in the page (no child component), pagination works as expected.
## To Reproduce
1. Create a child component with EventCallback OnPrevious/OnNext.
2. Render it from a page that loads paged data and tracks currentPage.
3. Bind handlers from parent to child callbacks.
4. Click Next/Previous.
Observed: state does not advance in that page context.
Expected: parent handler runs and page state updates.
## Workaround
Replace child component usage with inlined buttons in the parent page. Then it works.
## Environment
- Windows 10
- .NET 10.0 SDK (10.0.102)
- ASP.NET Core runtime 10.0.2
- Also observed historically on earlier .NET versions in the same project lineage.
## Notes
- The page is interactive (Blazor Server, not intentionally static SSR).
- No EditForm around the pagination in this case.
- Buttons use type="button".
Contributor guide
Assessment
This issue has not been assessed yet.