Skip to content

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

@rinobrondum

Description

@rinobrondum

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 (


{t('Filtrer')} ({current ? t(${current.name}) : t('Alle')})

<Box style={{position: 'relative'}}>
{listVisible && }


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

export default enhancer(FilterDropdown)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions