using the `.showCloseButton(action:)` option will automatically close the sheet regardless of the current `bottomSheetPosition` value
eito opened this issue · 1 comments
In an effort to have multiple views stacked in the panel, I was relying on bottomSheetPosition
to fully close the bottom sheet, but it seems that any time the default close button is tapped it will hide the panel if that's the supported position at index 0
https://github.com/lucaszischka/BottomSheet/blob/main/Sources/BottomSheet/BottomSheetView.swift#L326
Was this a conscious decision or maybe just hadn't considered this use case?
Use Case
- show a list of items
- tap on an item to present the detail (in bottom sheet)
- tap close button to pop back to list of items (This is where it will close the entire sheet)
Willing to contribute to add support for this, but unsure if that's a desired functionality
Yes it was the desired functionality, but im always open for input.
But I think instead of using the default .showCloseButton(action:)
which is indeed meant for closing the hole sheet,
you could put a button (maybe using the "chevron.backward.circle.fill" sfsymbol, which would be more intuitive) in the header content.
This button cloud have any action you want (like the one you mentioned above).
Moving the issue to discussion.