Skip to content

Releases: xJkit/react-goodbye

Add Conditional Prompt

28 Jul 20:02
Compare
Choose a tag to compare

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

11 Jul 13:47
Compare
Choose a tag to compare

Fix unintentional re-renders

06 May 07:18
Compare
Choose a tag to compare

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

22 Apr 02:39
Compare
Choose a tag to compare
  • 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

19 Apr 17:46
Compare
Choose a tag to compare
  1. Add test cases for withGoodBye and Provider
  2. Do not log error message in production when error occurs