From 3c0abdfbf8dce912c2a5b7d48a4f6eec926f8b76 Mon Sep 17 00:00:00 2001 From: Franco Ricchi Date: Wed, 4 Jan 2023 16:51:40 -0300 Subject: [PATCH] Fix Root view height --- dist/src/index.d.ts.map | 2 +- dist/src/index.js | 3 +-- src/index.tsx | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dist/src/index.d.ts.map b/dist/src/index.d.ts.map index 437f313..40ffeb0 100644 --- a/dist/src/index.d.ts.map +++ b/dist/src/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,EAML,eAAe,EAShB,MAAM,cAAc,CAAC;AACtB,OAAO,YAAuC,MAAM,gBAAgB,CAAC;AASrE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAE9C,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B;;OAEG;IACH,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH;;;OAGG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IAEjC;;OAEG;IACH,uBAAuB,EAAE,CACvB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,eAAe,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,KACjB,IAAI,CAAC;IAEV,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAEhC,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,EAAE,EAAE,YAAY,CAAC;CAClB,CAAC;;AAIF,wBAs6BE"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,EAML,eAAe,EAShB,MAAM,cAAc,CAAC;AACtB,OAAO,YAAuC,MAAM,gBAAgB,CAAC;AASrE,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAE9C,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B;;OAEG;IACH,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C;;OAEG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH;;;OAGG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;IAEjC;;OAEG;IACH,uBAAuB,EAAE,CACvB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,eAAe,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,KACjB,IAAI,CAAC;IAEV,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAEhC,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,EAAE,EAAE,YAAY,CAAC;CAClB,CAAC;;AAIF,wBAq6BE"} \ No newline at end of file diff --git a/dist/src/index.js b/dist/src/index.js index 6bc0cd5..452e857 100644 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -57,7 +57,6 @@ export default forwardRef(function ActionSheet(_a, ref) { var lock = useRef(false); var panViewRef = useRef(); var gestureBoundaries = useRef({}); - var initialWindowHeight = useRef(Dimensions.get('screen').height); var _9 = useState({ width: Dimensions.get('window').width, height: 0, @@ -614,7 +613,7 @@ export default forwardRef(function ActionSheet(_a, ref) { ? getZIndexFromStack(props.id, contextRef.current) : 999, width: '100%', - height: initialWindowHeight.current + height: '100%' }, pointerEvents: (props === null || props === void 0 ? void 0 : props.backgroundInteractionEnabled) ? 'box-none' diff --git a/src/index.tsx b/src/index.tsx index 9eb90e3..d501781 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -130,7 +130,6 @@ export default forwardRef( scrollOffset?: number; }; }>({}); - const initialWindowHeight = useRef(Dimensions.get('screen').height); const [dimensions, setDimensions] = useState<{ width: number; height: number; @@ -793,7 +792,7 @@ export default forwardRef( ? getZIndexFromStack(props.id, contextRef.current) : 999, width: '100%', - height: initialWindowHeight.current, + height: '100%', }, pointerEvents: props?.backgroundInteractionEnabled ? 'box-none'