react-transition-group icon indicating copy to clipboard operation
react-transition-group copied to clipboard

Inconsistent transition lifecycle when transitions disabled

Open Bartozzz opened this issue 3 years ago • 1 comments

We want to disable transitions in E2E tests. We have some logic associated with onEnter events, but those are not triggered when setting config.disabled = true.

What is the current behavior?

import { config, CSSTransition } from 'react-transition-group';

config.disabled = true;

<CSSTransition
  onEnter={() => {
    doStuffOnEnter();
  }}
  onEntered={() => {
    doStuffOnEntered();
  }}
>

doStuffOnEnter is not executed. Only doStuffOnEntered is executed.

What is the expected behavior?

All the events should be triggered in the correct order to imitate the real behavior.

Bartozzz avatar Jan 24 '22 11:01 Bartozzz

Just stumbled across the same issue in our codebase :/ @Bartozzz Did you find any solution?

pdimova avatar Mar 23 '22 10:03 pdimova