diff --git a/src/Selector/index.tsx b/src/Selector/index.tsx index 7dc36c7a5..45a2b58e4 100644 --- a/src/Selector/index.tsx +++ b/src/Selector/index.tsx @@ -189,9 +189,8 @@ const Selector: React.RefForwardingComponent = pasteClearRef.current = true; setTimeout(() => { pasteClearRef.current = false; + triggerOnSearch(value); }); - - triggerOnSearch(value); }; // ====================== Focus ====================== diff --git a/tests/Tags.test.tsx b/tests/Tags.test.tsx index b016e1fd4..08a3cae97 100644 --- a/tests/Tags.test.tsx +++ b/tests/Tags.test.tsx @@ -140,7 +140,8 @@ describe('Select.Tags', () => { expectOpen(wrapper, false); }); - it('paste content to split', () => { + it('paste content to split after 100ms', done => { + jest.useFakeTimers(); const onChange = jest.fn(); const wrapper = mount(