MCPcopy
hub / github.com/JedWatson/react-select / normalizedHeight

Function normalizedHeight

packages/react-select/src/utils.ts:169–175  ·  view source on GitHub ↗
(el: HTMLElement | typeof window)

Source from the content-addressed store, hash-verified

167// ------------------------------
168
169export function normalizedHeight(el: HTMLElement | typeof window): number {
170 if (isDocumentElement(el)) {
171 return window.innerHeight;
172 }
173
174 return el.clientHeight;
175}
176
177// Normalized scrollTo & scrollTop
178// ------------------------------

Callers 1

getMenuPlacementFunction · 0.90

Calls 1

isDocumentElementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…