All notable changes to this project will be documented in this file.
- Correctly export useModalize in https://github.com/jeremybarbet/react-native-modalize/commit/e8b95f66639bd5d7dd18039ea0f1d70c71b8030f
- Export useModalize from the root of the library in #441
- Adjust link to react-native-gesture-handler in #437
- Support RNGH V2 by @sakiwei in #378
- Jest - ReactNative.Platform.constants.reactNativeVersion is undefined by @ACHP in #368
- Platform.constants is undefined error in WEB by @lekzd in #367
- Make reactModalProps optional by @hagmic in #364
- Add react modal props to Modalize by @Regicollis in #352
- Add callback when closing modal by @maryjenel in #299
- Utility hook for modalize by @vambola in #309
- Revert: Position on orientation change
- Revert: If color scheme is "dark", setting modal backgroundColor to black
- Fix disableScrollIfPossible type (#283) (9b8563)
- Add missing word at callbacks section (#272) (5880ef)
- Added devices support for iPhone 12 devices (#294) (e80029)
- Position on orientation change (#274) (f0d75a)
- Allow custom renderer to receive function or react node (#291) (26a4c1)
- If color scheme is "dark", setting modal backgroundColor to black (#278) (d5ccbb)
- Update documentation about installation steps by @helderburato (4fcb51)
- More documentation about
contentRefprops (9dd339)
- Use ref for back button listener by @archansel (#189) (491dfe)
- Exposed IProps as ModalizeProps by @archansel (#233) (b84388)
- Allow overwrites on content's core props #194 (825fa2)
- Add listener for height on orientation change by @LucidNinja #195 (0bbdae)
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-portalizeto be able to solve this issue. It works with Modalize but can also be useful in other context.
- The required
refto open or close Modalize is still the sameref={modalizeRef},modalizeRef.current.open(). However, you won't be able to accessscrollTo,scrollToIndexon the content renderer using this ref anymore. You will need to use the new refcontentRefthat 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.
- Add
panGestureComponentEnabledandcloseSnapPointStraightEnabledprops (b831d3) - Add
rootStyleprops by @enniel (149af4) - Add
contentRefprops to access ScrollView/FlatList/SectionList methods by @xxsnakerxx (868870) - Add
childrenStyleprops (1519e9c) - Add
customRenderedprops (0f4e24f) - Add
velocityprops to improve dismiss behavior (9c6b85a) - Add
scrollToIndexprops for flatListProps #125 (19a3b41) - Add
thresholdprops by @adrianso (cf0be59) - Add
withOverlayprops by @marcinolek (5aa30f3) - Add
FloatingComponentprops by @vforvasile (#162) (269934e) - Add
modalElevationprops for Android #161 (0ad5923) - Add
onLayoutprops #49 (598d548) - Add
onOverlayPress#142 (748c3e7) - Add
onPositionChangeprops (#122) (302a347) - Add
panGestureAnimatedValueprops from PanGestureHandler (#113, #105, #69) (#160) (4780d5e) - Add
dragTossprops by @bcpugh (eb1b448) - Add
keyboardAvoidingOffset,panGestureEnabled,closeOnOverlayTapand 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)
- Allow
alwaysOpenandajustToContentHeightprops to work at the same time #172 (c37ecd5) - Simplified and fixed
adjustToContentHeightprops 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
alwaysOpento open to default position (bed354e) scrollTomethods updated for flatList and sectionList by @xxsnakerxx (#126) (038a5ab)
- 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) f1cd77a601897b1baadafa12a8fb2f55ccd891cf))
- 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
alwaysOpenprops on init (990cba7) - And many more...
- Use timing function onAnimateClose
- Revert bouncing translate
- Better spring/timing props
- Mask for empty space with bounce
- Fix bouncing on opening animation
- Clean examples from unused functions
- New argument to the
closemethod to reset to initial positionalwaysOpenmodal (close('alwaysOpen'))
- Fix glitchy issue
onAnimateOpencause byextrapolate: clampandspringanimation
- Remove uppercase from
options.tsfile
- Dev tools (prettier, commitlint)
- BREAKING Move to name import (before)
import Modalize from 'react-native-modalize'-> (after)import { Modalize } from 'react-native-modalize' - Fix overlay press to dismiss by @Esirei
- Fix initial state when using
alwaysOpenby @benjaminreid - Change renovate to keep all changes in same PR
- Update packages
- Update examples
- Rename source files
- Fix flickering issue with adjustToContentHeight by @charpeni
- Add renovate to keep packages up-to-date
- Upgrade dependencies
- Fix issue with hasAbsoluteStyle util
- Fix flickering on swipe gesture
- Update documentation
- Add changelog file
openAnimationConfig/closeAnimationConfigto control the animations by @WrathChaos.modalHeightto set a specific height to the modal by @WrathChaos.
- BREAKING
styleprops renamed tomodalStyle - BREAKING
heightprops renamed tosnapPoint - Create utils file to make internal source lighter
- More gif examples for all behaviors possible
- Move hardwareBackPress to open and close animation functions
- Add
alwaysOpenprops, to keep the modal always open on the bottom of the screen - Bump
js-yamlpackage because of security warning
- Improve documentation
- Refactor all examples, and make it easier to use them
- Move examples from React.class to stateless function
- Null check on component passed to Modalize
- Bump packages from source code and examples