File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,12 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
166
166
// prevent hiding the bottom sheet by
167
167
const dismissOnDraggingDownSheet = bottomSheetOptions . options ?. dismissOnDraggingDownSheet !== false ;
168
168
behavior . setHideable ( dismissOnDraggingDownSheet ) ;
169
+
170
+ const peekHeight = bottomSheetOptions . options ?. peekHeight ;
171
+ if ( peekHeight ) {
172
+ behavior . setState ( com . google . android . material . bottomsheet . BottomSheetBehavior . STATE_COLLAPSED ) ;
173
+ behavior . setPeekHeight ( Utils . layout . toDevicePixels ( peekHeight ) ) ;
174
+ }
169
175
if ( ! dismissOnDraggingDownSheet ) {
170
176
// directly expand the bottom sheet after start
171
177
behavior . setState ( com . google . android . material . bottomsheet . BottomSheetBehavior . STATE_EXPANDED ) ;
@@ -179,11 +185,6 @@ export class ViewWithBottomSheet extends ViewWithBottomSheetBase {
179
185
// disable peek/collapsed state
180
186
behavior . setSkipCollapsed ( true ) ;
181
187
}
182
- const peekHeight = bottomSheetOptions . options ?. peekHeight ;
183
- if ( peekHeight ) {
184
- behavior . setState ( com . google . android . material . bottomsheet . BottomSheetBehavior . STATE_COLLAPSED ) ;
185
- behavior . setPeekHeight ( Utils . layout . toDevicePixels ( peekHeight ) ) ;
186
- }
187
188
188
189
const onChangeState = bottomSheetOptions . options ?. onChangeState ;
189
190
if ( onChangeState ) {
You can’t perform that action at this time.
0 commit comments