Releases: marmelab/react-admin
Releases · marmelab/react-admin
5.0.0
🎉 New major release! React-admin v5 introduces new features and some breaking changes. 🚀
👉 Read the announcement blog post 👈
Here are the highlights:
🎨 UI Improvements
- Apps now have a theme switcher and a dark theme by default (#9479)
- Inputs now default to full width (#9704)
- Links are now underlined (#9483)
- List pages restore scroll position when coming back from Edit and Create views (#9774)
- Errors in the Layout code now trigger the Error Boundary (#9799)
- Button size can be set via props (#9735)
🏁 App Initialization
- Simpler custom layout components just need to render their children (#9591)
- No more props drilling for Layout, AppBar, Menu, etc (#9591)
- useDefaultTitle() hook returns the application title from anywhere in the app (#9591)
🗄️ Data Providers
- Data providers can now cancel queries for unmounted components (opt-in) (#9612)
- GraphQL data providers are easier to initialize (they are now synchronous) (#9820)
- GraphQL-Simple data provider supports Sparse Fields in queries (#9392)
- GraphQL-Simple data provider supports updateMany and deleteMany mutations (#9393)
- withLifecycleCallbacks now supports for wildcard and array of callbacks (#9577)
- Middlewares are more powerful and handle errors better (#9875)
📋 List pages
- Datagrid has rowClick enabled by default, it links to the edit or show view depending on the resource definition (#9466)
- List bulkActionButtons is now a Datagrid prop (#9707)
- setFilters doesn't debounce by default, so custom filters work as expected (#9682)
- List parameters persistence in the store can be disabled (#9742)
📝 Forms & Inputs
- Inputs no longer require to be touched to display a validation error (#9781)
- ReferenceInputs are now smarter by default as they use the recordRepresentation (#9902)
- Server-Side validation is now more robust (#9848)
- warnWhenUnsavedChanges works again (#9657)
- Smart input components like TranslatableInputs, ArrayInput, or ReferenceManyInput now compose more seamlessly thanks to a new SourceContext. There is no need for getSource in FormDataConsumer. (#9533)
- All inputs now have a unique ID - no more duplicate ID warnings (#9788)
- Learning Forms is facilitated by a new Form chapter in the doc (#9864)
💻 DX Improvements
- The default Record Representation for resources is now smarter (#9650)
- Data provider hooks like useGetOne have a smart return type based on the request state. This will force you to plan for the error case. (#9743)
- Stricter TypeScript types will detect more errors at compile time (#9741)
- PropTypes are gone, so there is no conflict with TypeScript types (#9851)
- create-react-admin can run in non-interactive mode (#9544)
- ra-data-fakerest accepts a delay parameter to simulate network delays (#9908)
- data-generator-retail now exposes types for the generated data (#9764)
🔄 Bump dependencies
- React-admin requires React 18 to leverage Concurrent React (#9827)
- React-admin uses the latest version of react-router, react-query, date-fns, fakerest, etc. (#9657, #9473, #9812, #9801, #9908)
- Internet Explorer is no longer supported (#9530)
🔄 Upgrading to v5
We've written a migration guide to help you upgrade your apps to v5. It covers all the breaking changes and how to adapt your code to the new APIs.
We estimate that a react-admin app with 50,000 lines of code will require about 2 days of work to upgrade to v5.
📜 Changelog
For a detailed changelog, see the release notes for the following pre-releases:
5.0.0-rc.1
5.0.0-rc.0
- Ensure React 19 compatibility (#9919) (djhi)
- Fix data provider queries are doubled in development when using strict mode (#9901) (djhi)
- Fix default
<Error>
background in globalErrorBoundary
(#9913) (fzaninotto) - Fix
combineDataProvider
throws a runtime error (#9910) (fzaninotto) - Fix
<List>
should not render<Error>
component on fetch error (#9912) (fzaninotto) - Fix
useDelete
doesn't delete record if itsid
is zero (#9894) (adguernier) - Update
<ArrayInput>
to useSourceContext
instead of cloning children (#9911) (adguernier) - Update
<SelectArrayInput>
to use default record representation when used inside<ReferenceArrayInput>
(#9902) (djhi) - Upgrade FakeRest to 4.0 (#9908) (fzaninotto)
- [TypeScript] Fix types of Field components (#9903) (slax57)
- [Dev] Fix
useRegisterMutationMiddleware
stories (#9899) (djhi) - [Dev] Deduplicate
yarn
.lock (#9897) (fzaninotto) - Backport changes from master (#9923) (slax57)
4.16.19
- Fix
<ArrayInput>
ghost error after removing scalar item (#9918) (djhi) - Fix filters with complex object are not removed from the UI (#9898) (hmatthieu)
- Fix
<SelectInput resettable>
does not reset the value (#9895) (fzaninotto) - [Doc] Clarify
<SaveButton transform>
usage (#9915) (slax57) - [Doc] Add link to Codesandbox for the simple demo (#9900) (adguernier)
- [Doc] Added Genezio as a data provider (#9890) (bogdanripa)
- [Doc] Fix typo in TreeWithDetails props list (#9884) (wfouche)
- [Doc] Fix NextJS API routing snippet (#9883) (PaulieScanlon)
- [Doc] Update ra-tree documentation (#9862) (erwanMarmelab)
5.0.0-beta.3
- Fix React requirement is too strict on npm (#9879) (fzaninotto)
- Fix success side effects run after error on refetch (#9878) (fzaninotto)
- Fix
<TextField>
should calltoString
instead ofJSON.stringify
for non-string values (#9888) (slax57) - Fix
<ReferenceInput>
in<ArrayInput>
(#9882) (fzaninotto) - [Doc] Update
ra-audit-log
chapter (#9881) (erwanMarmelab) - [Doc] Update
ra-navigation
chapter (#9877) (erwanMarmelab) - [Storybook] Fix some stories appear broken on devices which prefer dark mode (#9880) (slax57)
5.0.0-beta.2
5.0.0-beta.1
- Fix mutation middlewares (#9855) (djhi)
- Fix
useAuthProvider
may return undefined when noauthProvider
is available (#9861) (slax57) - Fix race condition between HTTP error notification and server-side validation error notification (#9848) (slax57)
- Update
<DatagridBody>
to create<RecordContext>
(#9808) (adguernier) - Update
clsx
to v2 (#9822) (MohammedFaragallah) - Update
query-string
to v9 (#9812) (MohammedFaragallah) - Update minimal requirement to React 18 (#9827) (fzaninotto)
- Remove support for React
PropTypes
(#9851) (slax57) - [Doc] Add Forms dedicated chapter (#9864) (fzaninotto)
- [Doc] Fix typos, anchor and examples (#9846) (WiXSL)
- [Doc] Explain how to change page with
useNavigation
(#9840) (erwanMarmelab) - [Doc] Add story for custom
<DatagridRow>
(#9847) (adguernier) - [Demo] Add task management to CRM app (#9842) (fzaninotto)
- [Demo] Fix
strictNullCheck
errors in examples (#9833) (djhi) - [TypeScript] Fix
useResourceDefinition
return type (#9852) (slax57) - [Chore] Optimize CI (#9857) (djhi)
- [Chore] Fix yarn cache in CI workflows (#9829) (fzaninotto)
- [Chore] Avoid using MUI in ra-core (#9831) (djhi)
- [Chore] Speed up unit tests by not using MUI Icons barrel files (#9828) (fzaninotto)
4.16.18
- Fix
<Datagrid>
uses wrong element for "Select All" label (#9826) (fzaninotto) - Fix
<ListView>
crashes when inside a tab (#9824) (fzaninotto) - Fix warning about
defaultProps
in React 18.3 (#9832) (djhi) - Bump ejs from 3.1.8 to 3.1.10 (#9814) (dependabot bot)
- [Doc] Improve doc for
<Autocomplete onCreate>
and similar props (#9858) (fzaninotto) - [Doc] Add missing
fetchUtils
import to make custom httpClient snippet clearer in TypeScript (#9843) (adguernier) - [Doc] update italian locale reference (#9830) (christianascone)
- [Doc] Fix Input usage mentions
disabled
instead ofreadOnly
(#9825) (fzaninotto) - [Typescript] Fix compilation error in
<MenuItemLink>
,<ResettableTextField>
and<InspectorButton>
with latest@types/react
(#9853) (ilia-os) - [Storybook] Fix
<TitlePortal>
stories (#9834) (djhi)
5.0.0-beta.0
This version contains breaking changes. Check the 5.0 upgrade guide to upgrade your application.
- Add
<ReferenceFieldBase>
(#9698) (djhi) - Add
<ReferenceInputBase>
(#9672) (djhi) - Add
<ReferenceManyField queryOptions>
prop (#9750) (erwanMarmelab) - Add
<List storeKey={false}>
to disable all store interactions (sort, pagination, filters and now also selection state). (#9742) (nbalaguer) - Add ability to set Button default props via theme (#9735) (fzaninotto)
- Add a global
ErrorBoundary
(#9799) (erwanMarmelab) - Update GraphQL data provider builders to return a data provider rather than a Promise (#9820) (djhi)
- Update
useInput
to generate a unique id by default (#9788) (erwanMarmelab) - Update
<List>
to restore scroll position when coming from Edit and Create views side effects (#9774) (djhi) - Update
<SimpleFormIterator>
so that it doesn't clone buttons (#9805) (djhi) - Update
react-error-boundary
to v4 (#9819) (MohammedFaragallah) - Update
react-i18next
to v14 (#9818) (MohammedFaragallah) - Update
react-dropzone
to v14 (#9811) (MohammedFaragallah) - Update
date-fns
to v3 (#9801) (MohammedFaragallah) - Update
@mui
to v5.15 (#9763) (djhi) - Update
inflection
to v3 (#9804) (MohammedFaragallah) - Remove deprecated props (#9789) (adguernier)
- Remove condition restricting error display to touched inputs (#9781) (slax57)
- Remove
<ReferenceManyFieldView>
(#9821) (djhi) - Fix CI action warnings (#9794) (fzaninotto)
- Fix
<SimpleList>
always returns empty when controlled (#9802) (fzaninotto) - Fix react-admin requires custom routers to be data routers (#9723) (fzaninotto)
- Fix
<SimpleList>
<Basic>
story (#9792) (adguernier) - Backport changes from master (#9765) (slax57)
- [Doc] Fix typo in tanstack query in migration docs (#9780) (smeng9)
- [Doc] Fix imported tanstack devtools package (#9736) (smeng9)
- [Demo] Rename commands to orders in
data-generator-retail
(#9800) (djhi) - [Demo] Restore examples production profiling & fix build warnings (#9817) (djhi)
- [TypeScript] Add better types to data-generator (#9764) (djhi)
- [TypeScript] Fix remaining strictNullCheck errors in ra-ui-materialui (#9797) (djhi)
- [TypeScript] Make types more strict in ra-ui-materialui, part III (#9795) (fzaninotto)
- [Typescript] Make types more strict in ra-ui-materialui, part II (#9790) (fzaninotto)
- [TypeScript] Make types more strict in ra-ui-materialui (#9761) (fzaninotto)
- [TypeScript] Make types more strict in ra-core, part III (#9760) (fzaninotto)
- [TypeScript] Make types more strict in ra-core, part II (#9743) (fzaninotto)
- [TypeScript] Make types more strict in ra-core (#9741) (fzaninotto)