File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1- import React , { render } from 'preact-compat' ;
1+ import React , { render , unmountComponentAtNode } from 'preact-compat' ;
22import cx from 'classnames' ;
33import {
44 getContainerNode ,
@@ -43,12 +43,6 @@ const renderer = ({
4343 ) ;
4444} ;
4545
46- const disposer = containerNode => ( ) => {
47- const range = document . createRange ( ) ; // IE10+
48- range . selectNodeContents ( containerNode ) ;
49- range . deleteContents ( ) ;
50- } ;
51-
5246/**
5347 * @typedef {Ojbect } SearchBoxTemplates
5448 * @property {function|string } submit Template used for displaying the submit. Can accept a function or a Hogan string.
@@ -177,9 +171,8 @@ You may want to migrate using \`connectSearchBox\`: ${createDocumentationLink({
177171 showLoadingIndicator,
178172 } ) ;
179173
180- const makeWidget = connectSearchBox (
181- specializedRenderer ,
182- disposer ( containerNode )
174+ const makeWidget = connectSearchBox ( specializedRenderer , ( ) =>
175+ unmountComponentAtNode ( containerNode )
183176 ) ;
184177
185178 return makeWidget ( { queryHook } ) ;
You can’t perform that action at this time.
0 commit comments