Skip to content

Releases: xJkit/react-goodbye

Add Conditional Prompt

Choose a tag to compare

@xJkit xJkit released this 28 Jul 20:02

Thanks to this PR: #14.

Adding conditional prompt function to allow rendering Goodbye on some conditions

Please check the README for the instructions.

Avoid having isShow as true after handleCancel action

Choose a tag to compare

@xJkit xJkit released this 11 Jul 13:47

Thanks to #11 for this minor fix.

Fix unintentional re-renders

Choose a tag to compare

@xJkit xJkit released this 06 May 07:18

Thanks for the discussion from #8, I made a improvement by #9

  1. Refactor GoodBye Provider with bound object literal that avoids the new React 16.3 context caveats which may leads to unintentional re-render
  2. Rename pass function to handlePass. It allows you to do additional actions (of course, you can wrap the handleOk or handleCancel with your own higher-order function!).

Add window alert support

Choose a tag to compare

@xJkit xJkit released this 22 Apr 02:39
  • alertBeforeUnload

    • When this props is true, the component will also add onbeforeunload event to the window object that detects the page to popup an alert before you leave without saving data changes.
    • This event fires when user close or reload the current page. The reason is that there is no way to detect close/reload actions except this event.
  • alertMessage

    • Custom browser popup message.
    • Note that the text message is only for IE users due to browser limitation.

enhance test coverage

Choose a tag to compare

@xJkit xJkit released this 19 Apr 17:46
  1. Add test cases for withGoodBye and Provider
  2. Do not log error message in production when error occurs