Standalonesearchbox launching error - React-google-maps

Asked

Viewed 12 times

0

my React application is returning error Uncaught Typeerror: Component.unregisterAllEvents is not a Function for the Standalonesearchbox of the React-google-maps. I’ve tried everything, even going through the dependency code. What might be going on? It’s in accordance with the documentation.

PS. When I take out the component in question the application wheel perfectly.

<Box className={clsx(classes.innerContainer, !isOpen && classes.hideContainer)} style={{ transition: 'transform .5s ease-in-out' }}>
                <Box className={classes.formContainer}>
                    {<div data-standalone-searchbox="" >
                    <StandaloneSearchBox
                     ref={searchBoxRef}
                     //bounds={props.bounds}
                     onPlacesChanged={handleOnPlacesChanged}
                    >
                        <input className={classes.field} placeholder="Origem" />
                    </StandaloneSearchBox>
                    </div>}
                <div className={classes.textField} >
                    <PinDropIcon fontSize="medium" color="primary" />
                    <input className={classes.field} placeholder="Origem" />
                </div>
                <div className={classes.textField}>
                    <PinDropIcon fontSize="medium" color="primary" />
                    <input className={classes.field} placeholder="Destino" />
                </div>
                <div className={classes.buttonContainer}>
                    <button className={classes.formButton} style={{ backgroundColor: 'green' }} onClick={handleGenerate}>
                        <SwapHorizOutlinedIcon />
                        Gerar
                    </button>
                    <button className={classes.formButton} style={{ backgroundColor: 'red' }}>
                        <DeleteOutlineIcon />
                        Limpar
                    </button>
                </div>
                <span style={{ marginTop: '24px' }}>Desenvolvido por UNICADTEC 2020. &copy;</span> 
            </Box>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.