2.0.0
Really happy to release this brand new major version for react-native-modalize.
I have been working on it for the last couple of weeks. Many thanks for the people who contributed, opened PR and found issues. High five to @xxsnakerxx for having contributing many times in the last few weeks!
- I rewrote the package using function component, that makes the library lighter, faster and using the latest React practices.
- I also rewrote and reorganize most of the documentation to be easier to read, with way more information about the props, methods, usages and more examples.
- Finally, there was a lot of issues about Modalize not being able to be displayed on top of a bottom tab navigation (e.g. with react-navigation). I released a new package called
react-native-portalize
to be able to solve this issue. It works with Modalize but can also be useful in other context.
💣 Breaking change
- The required
ref
to open or close Modalize is still the sameref={modalizeRef}
,modalizeRef.current.open()
. However, you won't be able to accessscrollTo
,scrollToIndex
on the content renderer using this ref anymore. You will need to use the new refcontentRef
that will give you access to the content methods.contentRef={contentRef}
,contentRef.current.getScrollResponder().scrollTo(...)
. "content" stands for ScrollView, FlatList or SectionList depending the content renderer you are using.
🎉 New features
- Add
panGestureComponentEnabled
andcloseSnapPointStraightEnabled
props (b831d3) - Add
rootStyle
props by @enniel (149af4) - Add
contentRef
props to access ScrollView/FlatList/SectionList methods by @xxsnakerxx (868870) - Add
childrenStyle
props (1519e9c) - Add
customRendered
props (0f4e24f) - Add
velocity
props to improve dismiss behavior (9c6b85a) - Add
scrollToIndex
props for flatListProps #125 (19a3b41) - Add
threshold
props by @adrianso (cf0be59) - Add
withOverlay
props by @marcinolek (5aa30f3) - Add
FloatingComponent
props by @vforvasile (#162) (269934e) - Add
modalElevation
props for Android #161 (0ad5923) - Add
onLayout
props #49 (598d548) - Add
onOverlayPress
#142 (748c3e7) - Add
onPositionChange
props (#122) (302a347) - Add
panGestureAnimatedValue
props from PanGestureHandler (#113, #105, #69) (#160) (4780d5e) - Add
dragToss
props by @bcpugh (eb1b448) - Add
keyboardAvoidingOffset
,panGestureEnabled
,closeOnOverlayTap
and improvements by @xxsnakerxx (#115) (7563c82) - New argument to close Modalize and to configure the pointerEvents #151 (#152) (92db47b)
- New argument to open Modalize in full height when using
snapPoint
#150 (#153) (dfd56fb)
✨ Improvements
- Allow
alwaysOpen
andajustToContentHeight
props to work at the same time #172 (c37ecd5) - Simplified and fixed
adjustToContentHeight
props by @xxsnakerxx (#166) (0c5d908) - Recalculate when toggle adjustToContentHeight prop (6fc762d)
- Basic support for react-native-web (8d98896)
- Enable horizontal scrolling for ScrollView by @xxsnakerxx (#121) (49ec5ae)
- Allow
alwaysOpen
to open to default position (bed354e) scrollTo
methods updated for flatList and sectionList by @xxsnakerxx (#126) (038a5ab)
👀 Bug Fixes
- Check heights of each Header/Footer/Floating components when used with
ajustToContentHeight
(#149) (7e219c) - Prevent overlay press closing alwaysOpen by @jordanl17 (f0eb9b)
- Avoid onScrollBeginDrag overriding default behavior by @xxsnakerxx (#180) (14f20cb)
- Make sure animate is enable when closing modalize (df49ca5)
f1cd77a)) - Translation check for panGesture value (a46fa43)
- Cancel translation when ScrollView is not scrolled to the top (a965fbe)
- Core uses nativeDriver, exposes props for panGestureAnimatedValue only (19bf709)
- Flickering while scrolling/panning (fe267cd)
- Pass onLayout if using adjustToContentHeight props (9b52c0e)
- Rework initial open/close states (534dc69)
- Take out modalPosition logic out of onPositionChange props check (a478ef1)
- Hardware back button press handler by @xxsnakerxx (#148) (7e1cbf0)
- Only trigger positive values (6e19ee8)
- Remove back press listener on unmount by @Grohden (#137) (eafb8ee), closes #111
- Enable scroll when keyboard is toggle (c7a7dbe)
- Make sure we don't enable scroll by mistake (716f5ab)
- Avoid events to be trigger twice (#130) (9413350)
- Disable scroll when using
adjustToContentHeight
(5550f3f) - Disable scroll with
alwaysOpen
props on init (990cba7) - And many more...