Skip to content

[@mantine/hooks] use-throttled-callback: Handle reentrant calls - #9284

Merged
rtivital merged 1 commit into
mantinedev:masterfrom
feritcemkahraman:fix/throttled-reentrant-callback
Oct 17, 2026
Merged

rtivital merged 1 commit into
mantinedev:masterfrom
feritcemkahraman:fix/throttled-reentrant-callback

Conversation

@feritcemkahraman

Copy link
Copy Markdown
Contributor

Calling the throttled function again from its own callback currently runs every call immediately. The throttle state is only updated after the callback returns.

Set the active state and argument refs before invoking the callback, so nested calls follow the existing trailing timer. If a callback throws, rethrow the error and allow later calls instead of leaving the throttle stuck.

The reentrant and trailing-error regressions fail before the fix; all 600 hooks tests pass afterward, including a leading-error compatibility check. Changed-file oxlint and formatting and all 30 package builds pass. Full TypeScript validation (packages, docs and help site) passes after generating the docs sponsor data. The required automated CLI review was attempted but the installed CLI rejected the configured model; no review result is claimed. Full repository tests and Storybook were not run.

@rtivital rtivital added the Verified Reviewed and verified PR label Oct 13, 2026
@rtivital

Copy link
Copy Markdown
Member

🤖 Beep boop, Claude (Fable 5.1) speaking! Pull request is perfect, no changes needed! Verified label added.

@rtivital
rtivital merged commit 87258ba into mantinedev:master Oct 17, 2026
1 check passed
@rtivital

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Verified Reviewed and verified PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants