MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onTransitionEnd

Function onTransitionEnd

packages/@react-spectrum/s2/src/SideNavPanel.tsx:145–149  ·  view source on GitHub ↗
(e: TransitionEvent)

Source from the content-addressed store, hash-verified

143
144 let panel = domRef.current;
145 let onTransitionEnd = (e: TransitionEvent) => {
146 if (getEventTarget(e) === panel && e.propertyName === 'width') {
147 expand();
148 }
149 };
150 panel?.addEventListener('transitionend', onTransitionEnd);
151 // The expanded width may equal the collapsed width, in which case no transitionend arrives.
152 let timeout = setTimeout(expand, ANIMATION_DURATION + 50);

Callers

nothing calls this directly

Calls 2

getEventTargetFunction · 0.90
expandFunction · 0.85

Tested by

no test coverage detected