palantir/blueprint

Toast animations do not work when multiple toasts are supposed to be animating

Open

#4516 aperta il 3 feb 2021

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
P3Package: coreType: bughelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

Environment

  • Package version(s): 3.38.2
  • Operating System: macOS 10.15
  • Browser name and version: Chrome 88.0.4324.96 (Official Build) (x86_64)

Code Sandbox

Link to a minimal repro: https://blueprintjs.com/docs/#core/components/toast

Steps to reproduce

  • Click any of the toast creation buttons in quick succession
  • OR set a low maximum and try to create a new toast once reaching the maximum
  • OR create a bunch of toasts and then clear() them all at once

Actual behavior

Only the newest/topmost (toast[0]) toast will actually animate, the rest will just instantly snap to their final state.

Expected behavior

All of the toasts will go through their full enter/exit animations.

Possible solution

Not a React guy but the common thread with this bug seems to be that only one animation will play at a time and when multiple animations should be playing only the toast at index 0 actually animates.

Guida contributor