Skip to content

Commit

Permalink
[Tabs] Fix useCallback missing arguments (mui#21471)
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsonBroadhurst authored Jun 18, 2020
1 parent d10f836 commit 2acb689
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/material-ui/src/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,12 @@ const Tabs = React.forwardRef(function Tabs(props, ref) {
};
}, [updateIndicatorState, updateScrollButtonState]);

const handleTabsScroll = React.useCallback(
debounce(() => {
updateScrollButtonState();
}),
const handleTabsScroll = React.useMemo(
() =>
debounce(() => {
updateScrollButtonState();
}),
[updateScrollButtonState],
);

React.useEffect(() => {
Expand Down

0 comments on commit 2acb689

Please sign in to comment.