diff --git a/src/Selector/SingleSelector.tsx b/src/Selector/SingleSelector.tsx index ae1a788f1..1be8ccddb 100644 --- a/src/Selector/SingleSelector.tsx +++ b/src/Selector/SingleSelector.tsx @@ -55,7 +55,7 @@ const SingleSelector: React.FC = (props) => { }, [combobox, activeValue]); // Not show text when closed expect combobox mode - const hasTextInput = mode !== 'combobox' && !open ? false : !!inputValue; + const hasTextInput = mode !== 'combobox' && !open && !showSearch ? false : !!inputValue; const title = item && (typeof item.label === 'string' || typeof item.label === 'number') diff --git a/tests/Select.test.tsx b/tests/Select.test.tsx index e45bf0d14..3e63a6507 100644 --- a/tests/Select.test.tsx +++ b/tests/Select.test.tsx @@ -1775,4 +1775,14 @@ describe('Select.Basic', () => { wrapper.simulate('click'); expect(onClick).toHaveBeenCalled(); }); + + it('should hide placeholder if force closed and showSearch with searchValue', () => { + const wrapper = mount( +