romgain / react-select-event

🦗 Simulate react-select events for react-testing-library
MIT License
210 stars 24 forks source link

After update react and react -dom from 17 to 18 FilterDropdown.js dont work. #177

Open rinobrondum opened 1 month ago

rinobrondum commented 1 month ago

Dropdown wont show after opgrade to react 18.

Her is the code for FilterDropdown.js. Hope someone have a suggestion to fix it.

import React from 'react' import {Flex, Box} from '@rebass/grid' import {compose, mapProps} from 'recompose' import {withToggle, withRouterParams} from 'lib/hoc' import {Button} from 'components' import TypeList from './TypeList' import {typesById} from 'activities/constants' import useCustomTranslation from 'lib/customT'

const FilterDropdown = ({listVisible, toggleList, hideList, current}) => { const t = useCustomTranslation()

return (

{listVisible && }

) } const enhancer = compose( withRouterParams, mapProps(({params: {type}}) => ({ current: typesById[type], })), withToggle('list') )

export default enhancer(FilterDropdown)