Skip to content

Commit

Permalink
fix(useTransitionStatus): set to unmounted (#2899)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed May 14, 2024
1 parent 8306845 commit 8b6311d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react/src/hooks/useTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ export function useTransitionStatus(
const [status, setStatus] = React.useState<Status>('unmounted');
const isMounted = useDelayUnmount(open, closeDuration);

if (!isMounted && status === 'close') {
setStatus('unmounted');
}

useModernLayoutEffect(() => {
if (!floating) return;

Expand Down

0 comments on commit 8b6311d

Please sign in to comment.