Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix react-admin requires custom routers to be data routers #9723

Merged
merged 6 commits into from
Mar 15, 2024

Commits on Mar 14, 2024

  1. Fix react-admin requires custom routers to be data routers

    The reimplentation of the `warnWhenUnsavedChanges` feature with react-router's `useBlocker` created a breaking change. As `useBlocker` throws an error when not called in a DataRouter, and since we cannot call hooks conditionally, this meant that react-admin MUST be used inside a data router.
    
    By moving the `warnWhenUnsavedChanges` logic from the `useAugmentedForm` hook to a custom component, we can now call the component conditionally - and avoid calling it when not inside a data router.
    fzaninotto committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    c566862 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. Fix upgrade guide

    fzaninotto committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4cd02d0 View commit details
    Browse the repository at this point in the history
  2. Add story and unit test

    fzaninotto committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    426fe10 View commit details
    Browse the repository at this point in the history
  3. Update docs/Upgrade.md

    Co-authored-by: Jean-Baptiste Kaiser <jb@marmelab.com>
    fzaninotto and slax57 authored Mar 15, 2024
    Configuration menu
    Copy the full SHA
    f6500e1 View commit details
    Browse the repository at this point in the history
  4. Review

    fzaninotto committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    375ad47 View commit details
    Browse the repository at this point in the history
  5. [no ci] code review

    slax57 committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    aee15f8 View commit details
    Browse the repository at this point in the history