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

Function onResizeStart

packages/react-aria/src/utils/keyboard.tsx:136–145  ·  view source on GitHub ↗
(e: Event)

Source from the content-addressed store, hash-verified

134}
135
136function onResizeStart(e: Event): void {
137 // So we don't constantly call clearTimeout and setTimeout, keep track of the
138 // current timeout time and only reschedule the timer when it is getting close.
139 if (state.resizeTimeStamp <= e.timeStamp + 50) {
140 state.resizeTimeStamp = e.timeStamp + 150;
141
142 window.clearTimeout(state.resizeTimeout);
143 state.resizeTimeout = window.setTimeout(onResizeEnd, 150);
144 }
145}
146
147function onResizeEnd(): void {
148 let viewportMeta = getMetaValue('viewport');

Callers 1

useTableColumnResizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected