Closed deckameron closed 2 years ago
I had this same issue and was able to fix it by setting the content view on the open button.
bottomSheetController.contentView = bottomView;
HI @dlewis23,
Thank you for your assist. :-)
Unfortunately I didn't quite understand what you meant by "setting the content view on the open button". Sorry!
Where did you put the code bottomSheetController.contentView = bottomView;
?
Did you mean this:
button.addEventListener('click', function (){
bottomSheetController.contentView = bottomView;
bottomSheetController.show({
animated:true
});
});
@deckameron
Yes that is what I did and it worked for me to fix the issue of it only opening once.
@dlewis23 it did not work for me. :-( It is still showing only once.
[EDIT]
To make it work you have to set nonSystemSheet:true
I still get this even with nonSystemSheet:true
@jasonkneen Did you do this as well?
button.addEventListener('click', function (){
bottomSheetController.contentView = bottomView;
bottomSheetController.show({
animated:true
});
});
I still get this even with
nonSystemSheet:true
When using the native I could not get it open again. Only when nonSystemSheet = true will it work repeatedly.
I updated the module... eventListerners changed and the methods
show() is now open() and hide() is now close()
Also when closed you need to do createBottomSheet() again, because the instance is destroyed by close() method!!!
multiple instances of the bottomSheet will now also work!
@mbender74 Is their anyway to keep the sheet open in the small state when nonSystemSheet is true?
@dlewis23 yes -> new property nonSystemSheetDisablePanGestureDismiss:bool
Hi @mbender74 ,
Thank you for creating this module!
I am using your example to test the module but I can't get it to show twice. I only shows the first time. I have edited your example code and added a button show the bottom sheet when it is clicked.
This is the event sequence:
if you change 'nonSystemSheet' para true it still won't work twice but the error changes to:
The bottomSheet is "closed", but the error event says it is showing. Am I doing anything wrong?
My code is this: