diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index 6748c93c..d6997c59 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -659,7 +659,12 @@ const BottomSheetComponent = forwardRef( status === KEYBOARD_STATUS.SHOWN && position !== closedDetentPosition ) { - index = highestDetentPosition ?? DEFAULT_KEYBOARD_INDEX; + if (detents !== undefined && highestDetentPosition !== undefined) { + index = detents.indexOf(highestDetentPosition); + } + if (index === -1) { + index = DEFAULT_KEYBOARD_INDEX; + } } /**