From 688c063c04c9f5951b62b2bb795209ad0d249d9f Mon Sep 17 00:00:00 2001 From: Dan Haub Date: Mon, 11 Sep 2023 09:58:04 -0700 Subject: [PATCH 1/2] fixes autocomplete filled input deepmerge error --- packages/mui-material/src/FilledInput/FilledInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mui-material/src/FilledInput/FilledInput.js b/packages/mui-material/src/FilledInput/FilledInput.js index e618edf66553aa..318cbbe957636f 100644 --- a/packages/mui-material/src/FilledInput/FilledInput.js +++ b/packages/mui-material/src/FilledInput/FilledInput.js @@ -229,7 +229,7 @@ const FilledInput = React.forwardRef(function FilledInput(inProps, ref) { const componentsProps = slotProps ?? componentsPropsProp - ? deepmerge(slotProps ?? componentsPropsProp, filledInputComponentsProps) + ? deepmerge(filledInputComponentsProps, slotProps ?? componentsPropsProp) : filledInputComponentsProps; const RootSlot = slots.root ?? components.Root ?? FilledInputRoot; From fc7f7b0a464ea9dc1b379292d856db05aa535e84 Mon Sep 17 00:00:00 2001 From: mnajdova Date: Tue, 14 Nov 2023 12:26:57 +0100 Subject: [PATCH 2/2] add test --- packages/mui-material/src/FilledInput/FilledInput.test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/mui-material/src/FilledInput/FilledInput.test.js b/packages/mui-material/src/FilledInput/FilledInput.test.js index e7ce5fde0068d7..cb79f65cbb5af3 100644 --- a/packages/mui-material/src/FilledInput/FilledInput.test.js +++ b/packages/mui-material/src/FilledInput/FilledInput.test.js @@ -1,6 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { createRenderer, describeConformance } from '@mui-internal/test-utils'; +import { styled } from '@mui/material/styles'; import FilledInput, { filledInputClasses as classes } from '@mui/material/FilledInput'; import InputBase from '@mui/material/InputBase'; @@ -67,4 +68,10 @@ describe('', () => { ); expect(document.querySelector('[data-test=test]')).toHaveComputedStyle({ marginTop: '10px' }); }); + + it('should not throw: "Maximum call stack size exceeded" if both slotProps and an adornment are passed', () => { + const Adornment = styled('div')({}); + render(} slotProps={{}} />); + render(} slotProps={{}} />); + }); });