diff --git a/packages/react/src/components/BottomSheet/BottomSheet.test.tsx b/packages/react/src/components/BottomSheet/BottomSheet.test.tsx index 0574607ab..d2b8159e9 100644 --- a/packages/react/src/components/BottomSheet/BottomSheet.test.tsx +++ b/packages/react/src/components/BottomSheet/BottomSheet.test.tsx @@ -135,6 +135,7 @@ test('should set focus to custom element when opened', () => { data-testid="bottomsheet" focusOptions={{ initialFocus: ref.current as HTMLElement }} > + ); @@ -146,6 +147,7 @@ test('should set focus to custom element when opened', () => { focusOptions={{ initialFocus: ref.current as HTMLElement }} open > + ); @@ -161,6 +163,7 @@ test('should set focus to custom ref element', () => { data-testid="bottomsheet" focusOptions={{ initialFocus: ref }} > + ); @@ -172,6 +175,7 @@ test('should set focus to custom ref element', () => { focusOptions={{ initialFocus: ref }} open > + ); diff --git a/packages/react/src/components/BottomSheet/index.tsx b/packages/react/src/components/BottomSheet/index.tsx index 5a1798f32..9e2f94238 100644 --- a/packages/react/src/components/BottomSheet/index.tsx +++ b/packages/react/src/components/BottomSheet/index.tsx @@ -34,6 +34,7 @@ const BottomSheet = forwardRef( const [labelId] = useId(1, 'bottom-sheet-label'); const handleClose = useCallback(() => { + // istanbul ignore else if (typeof onClose === 'function') { onClose(); }