react-native-modalbox
react-native-modalbox copied to clipboard
Is it possible to change the size of modal after it is rendered ?
I want to increase the height of modal when modal content is scrolled upwards and decrease it when scrolled downwards.
I am changing the height but nothing seems to work. I wonder if it is possible or not ?
you can try providing callback method to model. call this method on scroll of the content in model.
I know this is wicked old but for other people googling through, I was having the same issue adjusting the height after the modal was rendered trying to emulate the android bottom sheet with a peek header. I found that PR https://github.com/maxs15/react-native-modalbox/pull/94 was causing issues
Specifically the line that added:
delete this.onViewLayoutCalculated;
I deleted it and now my height changes as expected. I'm not sure what other effects deleting it will have but for me it works.
@reasonman it worked like a charm, you saved my day man!
@reasonman worked like a charm for me also, thanks!
@reasonman thank you so much for this fix. The line being referenced is now this line https://github.com/maxs15/react-native-modalbox/blob/v2.0.0/index.js#L567
@maxs15 Any chance this fix could be brought in?