Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Applying motion to className (for display:none) #78

Open
yarnball opened this issue Jun 10, 2017 · 0 comments
Open

Applying motion to className (for display:none) #78

yarnball opened this issue Jun 10, 2017 · 0 comments

Comments

@yarnball
Copy link

yarnball commented Jun 10, 2017

Hi,

This looks like a great project.

I'm using an active class to display results. When I add an item to this list, the transition occurs. However, when the className noResult (which is display:none) is applied- it shows nothing.

How can I get the transition to apply on my class name noResult?

I put this in a codesandbox (https://codesandbox.io/s/o2LyXwxyL). Use the filters, and the display:none will be applied. That's where I want the transition states.

      <Transition
        component={false}
        enter={{
          opacity: 1,
        }}
        leave={{
          opacity: 0,
        }}>  
            <li key={result.id} className={isActive ? 'result' : 'noResult'}>
              {result.name} {' '} {result.id}
              ({result.genres.map(x => x.name).join(', ')}){' '}
            </li>
        </Transition>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant