Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[tooltip] Warn instead of error when trigger is disabled #44846

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {
title !== '' &&
childNode.tagName.toLowerCase() === 'button'
) {
console.error(
console.warn(
[
'MUI: You are providing a disabled `button` child to the Tooltip component.',
'A disabled element does not fire events.',
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tooltip/Tooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ describe('<Tooltip />', () => {
</button>
</Tooltip>,
);
}).toErrorDev('MUI: You are providing a disabled `button` child to the Tooltip component');
}).toWarnDev('MUI: You are providing a disabled `button` child to the Tooltip component');
});

it('should not raise a warning when we are controlled', () => {
Expand Down
Loading