diff --git a/packages/strapi-design-system/src/Combobox/Combobox.tsx b/packages/strapi-design-system/src/Combobox/Combobox.tsx index 06fd7c334..b6386fdc5 100644 --- a/packages/strapi-design-system/src/Combobox/Combobox.tsx +++ b/packages/strapi-design-system/src/Combobox/Combobox.tsx @@ -191,15 +191,6 @@ export const ComboboxInput = React.forwardRef { - /** - * When the value prop changes "externally" update the text input value too - */ - handleTextValueChange(value || ''); - - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [value]); - const hintId = `${generatedId}-hint`; const errorId = `${generatedId}-error`; diff --git a/packages/strapi-design-system/src/Combobox/__tests__/Combobox.spec.tsx b/packages/strapi-design-system/src/Combobox/__tests__/Combobox.spec.tsx index 4fe44d02e..8b918a765 100644 --- a/packages/strapi-design-system/src/Combobox/__tests__/Combobox.spec.tsx +++ b/packages/strapi-design-system/src/Combobox/__tests__/Combobox.spec.tsx @@ -71,19 +71,6 @@ describe('Combobox', () => { expect(getByRole('combobox')).toHaveValue('Strawberry 2'); }); - it('should correctly change the rendered text value of the combobox when the value prop changes externally', async () => { - const onTextValueChange = jest.fn(); - const { rerender } = renderRTL(); - - expect(onTextValueChange).toHaveBeenCalledTimes(1); - expect(onTextValueChange).toHaveBeenCalledWith(''); - - rerender(); - - expect(onTextValueChange).toHaveBeenCalledTimes(2); - expect(onTextValueChange).toHaveBeenCalledWith('bagel'); - }); - describe('callbacks', () => { it('should fire onChange only when the value is changed not when the input does', async () => { const onChange = jest.fn();