react-router-navigation-prompt
Advanced tools
Comparing version 1.7.1 to 1.8.0
@@ -7,2 +7,6 @@ # Changelog | ||
## [1.8.0] - 2018-10-09 | ||
### Added | ||
- allowGoBack: bool prop (use _goBack_ method instead of _push_ when navigating back -- !! NOTE WELL !! it will _always_ navigate back only 1 item, even when it should navigate back more items. read more: https://github.com/ZacharyRSmith/react-router-navigation-prompt/pull/30) | ||
## [1.7.1] - 2018-10-09 | ||
@@ -9,0 +13,0 @@ ### Fixed |
@@ -203,3 +203,3 @@ module.exports = | ||
action = { | ||
'POP': 'push', | ||
'POP': this.props.allowGoBack ? 'goBack' : 'push', | ||
'PUSH': 'push', | ||
@@ -206,0 +206,0 @@ 'REPLACE': 'replace' |
{ | ||
"name": "react-router-navigation-prompt", | ||
"version": "1.7.1", | ||
"version": "1.8.0", | ||
"description": "A replacement component for the react-router `<Prompt/>`. Allows for more flexible dialogs.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -95,2 +95,3 @@ # React Router <NavigationPrompt/> | ||
- afterConfirm?: Function, | ||
- allowGoBack: bool (use _goBack_ method instead of _push_ when navigating back -- !! NOTE WELL !! it will _always_ navigate back only 1 item, even when it should navigate back more items. read more: https://github.com/ZacharyRSmith/react-router-navigation-prompt/pull/30), | ||
- beforeCancel?: Function, | ||
@@ -97,0 +98,0 @@ - beforeConfirm?: Function, |
@@ -18,2 +18,3 @@ /* @flow */ | ||
disableNative: bool, | ||
allowGoBack: bool, | ||
}; | ||
@@ -117,3 +118,3 @@ declare type StateT = { | ||
action = { | ||
'POP': 'push', | ||
'POP': this.props.allowGoBack ? 'goBack' : 'push', | ||
'PUSH': 'push', | ||
@@ -120,0 +121,0 @@ 'REPLACE': 'replace' |
@@ -16,2 +16,3 @@ import * as React from 'react'; | ||
afterConfirm?: () => void; | ||
allowGoBack?: boolean; | ||
beforeCancel?: () => void; | ||
@@ -18,0 +19,0 @@ beforeConfirm?: () => void; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
455353
6005
106