-
6bd14228760d3e1e205ea9248e427f9afa2ec046
Thanks @BatuhanW! - chore: addedtype
qualifier to imports used as type only.- import { A } from "./example.ts"; + import type { A } from "./example.ts";
-
#5945
90930b381d8d369c63bc59beedf69c391875166d
Thanks @aliemir! - chore: addedtype
qualifier to imports used as type only.- import { A } from "./example.ts"; + import type { A } from "./example.ts";
-
#5928
db9756e7908
Thanks @aliemir! - fix: type errors on typescript <5Due to the changes in #5881, typescript users below version 5 are facing type errors. This PR fixes the type errors by updating the file extensions required by the
d.mts
declaration files to provide a compatible declarations for both typescript 4 and 5 users.
- #5881
ba719f6ea26
Thanks @aliemir! - fix: declaration files in node10, node16 and nodenext module resolutions
-
#5754
56ed144a0f5
Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752fixed: Some type errors are fixed due to the TypeScript upgrade.
-
#5765
0c197d82393
Thanks @aliemir! - refactor: package bundles and package.json configuration for exportsPreviously, Refine packages had exported ESM and CJS bundles with same
.js
extension and same types for both with.d.ts
extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with.mjs
extension and CJS bundles with.cjs
extension. Also types are now exported with both.d.mts
and.d.cts
extensions.In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.
Above mentioned changes also supported with changes in
package.json
files of the packages to support the new extensions and types. All Refine packages now includeexports
fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers. -
#5765
0c197d82393
Thanks @aliemir! - Fixed thelodash-es
imports for ESM builds to access the exports properly. -
#5714
38f129f40ee
Thanks @aliemir! - Due to the bug fix made in the@refinedev/core
,onFinishAutoSave
's returned promise can now reject and should be handled accordingly. UpdateduseForm
's auto save handler to catch the rejection without breaking the application.Additionally due to the same changes,
onFinish
should also be handled accordingly. UpdateduseForm
'ssaveButtonProps.onClick
to catch the rejection without breaking the application. -
#5755
404b2ef5e1b
Thanks @BatuhanW! - fix: incorrect type imports
- #5695
79865affa1c
Thanks @BatuhanW! - chore: apply biome format and fix lint errors.
- #5573
546df06482
Thanks @alicanerdurmaz! - chore: add "use client" directive to exported files to work with nextjs app router
- #5425
190af9fce2
Thanks @aliemir! - Updated@refinedev/core
peer dependencies to latest (^4.46.1
)
- #5201
760cfbaaa2a
Thanks @aliemir! - Updated initial value setting logic inuseForm
to handle nested objects properly.
- #5201
760cfbaaa2a
Thanks @aliemir! - Updated initial value setting logic inuseForm
to handle nested objects properly.
-
#5022
80513a4e42f
Thanks @BatuhanW! - chore: update README.md- fix grammar errors.
- make all README.md files consistent.
- add code example code snippets.
-
#5022
80513a4e42f
Thanks @BatuhanW! - chore: update README.md- fix grammar errors.
- make all README.md files consistent.
- add code example code snippets.
- #4964
85b1ac0db5f
Thanks @BatuhanW! - chore: update @refinedev/core peer dependency versions.
- #4964
85b1ac0db5f
Thanks @BatuhanW! - chore: update @refinedev/core peer dependency versions.
- #4903
e327cadc011
Thanks @yildirayunlu! - feat: addinvalidateOnUnmount
prop touseForm
hook. feat: addinvalidateOnUnmount
andinvalidateOnClose
prop touseModalForm
hook. From now on, you can use these props to invalidate queries upon unmount and/or close
- #4903
e327cadc011
Thanks @yildirayunlu! - feat: addinvalidateOnUnmount
prop touseForm
hook. feat: addinvalidateOnUnmount
andinvalidateOnClose
prop touseModalForm
hook. From now on, you can use these props to invalidate queries upon unmount and/or close
- #4948
8e5efffbb23
Thanks @aliemir! - Keep the hook and component names in builds for better debugging.
- #4948
8e5efffbb23
Thanks @aliemir! - Keep the hook and component names in builds for better debugging.
- #4767
c757355da60
Thanks @alicanerdurmaz! - fixed:useModalForm
sends request twice whensyncWithLocation
is true
- #4767
c757355da60
Thanks @alicanerdurmaz! - fixed:useModalForm
sends request twice whensyncWithLocation
is true
- #4741
026ccf34356
Thanks @aliemir! - AddedsideEffects: false
topackage.json
to help bundlers tree-shake unused code.
- #4741
026ccf34356
Thanks @aliemir! - AddedsideEffects: false
topackage.json
to help bundlers tree-shake unused code.
-
#4652
96af6d25b7a
Thanks @alicanerdurmaz! - feat: when thedataProvider
returns rejected promise witherrors
field,useForm
will automatically update the error state with the rejectederrors
field.Refer to the server-side form validation documentation for more information. →
-
#4652
96af6d25b7a
Thanks @alicanerdurmaz! - feat: when thedataProvider
returns rejected promise witherrors
field,useForm
will automatically update the error state with the rejectederrors
field.Refer to the server-side form validation documentation for more information. →
-
#4576
9a895ea39dc
Thanks @alicanerdurmaz! - fixed:handleSubmitReactHookForm
now returns a Promise without awaiting it. With this change, unhandled errors will propagate to the caller. -
#4527
ceadcd29fc9
Thanks @salihozdemir! - fix: prioritization of forgottenidentifier
If
identifier
is provided, it will be used instead ofname
.import { useModalForm } from "@refinedev/react-hook-form"; useModalForm({ refineCoreProps: { resource: "identifier-value", }, });
fix: use translate keys with
identifier
Previously, the translate keys were generated using resource
name
. This caused issues when you had multipleresource
usage with the same name. Now thetranslate
keys are generated usingidentifier
if it's present.
-
#4576
9a895ea39dc
Thanks @alicanerdurmaz! - fixed:handleSubmitReactHookForm
now returns a Promise without awaiting it. With this change, unhandled errors will propagate to the caller. -
#4527
ceadcd29fc9
Thanks @salihozdemir! - fix: prioritization of forgottenidentifier
If
identifier
is provided, it will be used instead ofname
.import { useModalForm } from "@refinedev/react-hook-form"; useModalForm({ refineCoreProps: { resource: "identifier-value", }, });
fix: use translate keys with
identifier
Previously, the translate keys were generated using resource
name
. This caused issues when you had multipleresource
usage with the same name. Now thetranslate
keys are generated usingidentifier
if it's present.
- #4306
e6eb4dea627
Thanks @yildirayunlu! - feat:syncWithLocation.syncId
default totrue
foruseModalForm
.
- #4306
e6eb4dea627
Thanks @yildirayunlu! - feat:syncWithLocation.syncId
default totrue
foruseModalForm
.
- #4241
fbe109b5a8b
Thanks @salihozdemir! - Added new generic types to theuseForm
hooks. Now you can pass the query types and the mutation types to the hook.
- #4241
fbe109b5a8b
Thanks @salihozdemir! - Added new generic types to theuseForm
hooks. Now you can pass the query types and the mutation types to the hook.
- #4210
b992e11e338
Thanks @alicanerdurmaz! - fixed: The values of the registered fields were set using thereset()
function. This has been changed to usegetValues()
instead. This fixes an issue where the values of the registered fields' dirty state were not being set correctly.
- #4210
b992e11e338
Thanks @alicanerdurmaz! - fixed: The values of the registered fields were set using thereset()
function. This has been changed to usegetValues()
instead. This fixes an issue where the values of the registered fields' dirty state were not being set correctly.
-
#4113
1c13602e308
Thanks @salihozdemir! - Added missing third generic parameter to hooks which are usinguseQuery
internally.For example:
import { useOne, HttpError } from "@refinedev/core"; const { data } = useOne<{ count: string }, HttpError, { count: number }>({ resource: "product-count", queryOptions: { select: (rawData) => { return { data: { count: Number(rawData?.data?.count), }, }; }, }, }); console.log(typeof data?.data.count); // number
- #4120
1f310bd7b69
Thanks @aliemir! - Fix brokenuseModalForm
withcreate
actions.
- #4120
1f310bd7b69
Thanks @aliemir! - Fix brokenuseModalForm
withcreate
actions.
- #4114
afdaed3dd83
Thanks @aliemir! - UpdateduseModalForm
hook'smodal.show
method to check if there's anid
present or provided. If there is, it will continue to show the modal. If not, the modal will not show. (Resolves #4062)
- #4114
afdaed3dd83
Thanks @aliemir! - UpdateduseModalForm
hook'smodal.show
method to check if there's anid
present or provided. If there is, it will continue to show the modal. If not, the modal will not show. (Resolves #4062)
- #3909
631512e91ec
Thanks @salihozdemir! - Fixed a bug that the form values were not filled when the user next to steps.
- #3909
631512e91ec
Thanks @salihozdemir! - Fixed a bug that the form values were not filled when the user next to steps.
-
Thanks @aliemir, @alicanerdurmaz, @batuhanW, @salihozdemir, @yildirayunlu, @recepkutuk! All
react-hook-form
imports re-exported from@refinedev/react-hook-form
have been removed. You should import them from thereact-hook-form
package directly.If the package is not installed, you can install it with your package manager:
npm install react-hook-form # or pnpm add react-hook-form # or yarn add react-hook-form
After that, you can import them from
react-hook-form
package directly.- import { useForm, Controller } from "@refinedev/react-hook-form"; + import { useForm } from "@refinedev/react-hook-form"; + import { Controller } from "react-hook-form";
-
Thanks @aliemir, @alicanerdurmaz, @batuhanW, @salihozdemir, @yildirayunlu, @recepkutuk! Updated the components to match the changes in routing system of
@refinedev/core
.This includes
meta
props in buttons andSider
component.meta
property can be used to pass additional parameters to the navigation paths.For a
posts
resource definition like this:<Refine resources={[ { name: "posts", list: "/posts", show: "/:authorId/posts/:id", } ]} >
You can pass
authorId
to theShowButton
component like this:<ShowButton resource="posts" id="1" meta={{ authorId: 123 }}>
This will navigate to
/123/posts/1
path. -
Thanks @aliemir, @alicanerdurmaz, @batuhanW, @salihozdemir, @yildirayunlu, @recepkutuk! Moving to the
@refinedev
scope 🎉🎉Moved to the
@refinedev
scope and updated our packages to use the new scope. From now on, all packages will be published under the@refinedev
scope with their new names.Now, we're also removing the
refine
prefix from all packages. So, the@pankod/refine-core
package is now@refinedev/core
,@pankod/refine-antd
is now@refinedev/antd
, and so on.
- #3822
0baa99ba787
Thanks @BatuhanW! - - refine v4 release announcement added to "postinstall". - refine v4 is released 🎉 The new version is 100% backward compatible. You can upgrade to v4 with a single command! See the migration guide here: https://refine.dev/docs/migration-guide/3x-to-4x
- #3822
0baa99ba787
Thanks @BatuhanW! - - refine v4 release announcement added to "postinstall". - refine v4 is released 🎉 The new version is 100% backward compatible. You can upgrade to v4 with a single command! See the migration guide here: https://refine.dev/docs/migration-guide/3x-to-4x
- #3307
1262f2c4589
Thanks @omeraplak! - Fixed resetting values on step changes - #3290
- #3307
1262f2c4589
Thanks @omeraplak! - Fixed resetting values on step changes - #3290
- #3209
e0279bce6f1
Thanks @yildirayunlu! - Export all types.
- #3209
e0279bce6f1
Thanks @yildirayunlu! - Export all types.
- #3196
78b3fd90fcf
Thanks @yildirayunlu! - ExportUseFieldArrayReplace
type fromreact-hook-form
.
- #3196
78b3fd90fcf
Thanks @yildirayunlu! - ExportUseFieldArrayReplace
type fromreact-hook-form
.
- Fixed version of react-router to
6.3.0
- #2501
4095a578d4
Thanks @omeraplak! - Fixed version of react-router to6.3.0
- Update type declaration generation with
tsc
instead oftsup
for better navigation throughout projects source code.
- #2440
0150dcd070
Thanks @aliemir! - Update type declaration generation withtsc
instead oftsup
for better navigation throughout projects source code.
- Added type checking to fix fields reset bug
- #2296
cca5a3d0c1
Thanks @ozkalai! - Added type checking to fix fields reset bug
- Fixed immediate triggering of
handleSubmit
- #2288
6847672849
Thanks @omeraplak! - Fixed immediate triggering ofhandleSubmit
- Add React@18 support 🚀
- #1718
b38620d842
Thanks @omeraplak! - Add React@18 support 🚀
-
All of the refine packages have dependencies on the
@pankod/refine-core
package. So far we have managed these dependencies withpeerDependencies
+dependencies
but this causes issues like #2183. (having more than one @pankod/refine-core version in node_modules and creating different instances)Managing as
peerDependencies
+devDependencies
seems like the best way for now to avoid such issues.
-
#2217
b4aae00f77
Thanks @omeraplak! - All of the refine packages have dependencies on the@pankod/refine-core
package. So far we have managed these dependencies withpeerDependencies
+dependencies
but this causes issues like #2183. (having more than one @pankod/refine-core version in node_modules and creating different instances)Managing as
peerDependencies
+devDependencies
seems like the best way for now to avoid such issues.
- Fixed a bug that prevented modal or drawer from closing after submit.
- #1931
4012d3c4ae
Thanks @salihozdemir! - Fixed a bug that prevented modal or drawer from closing after submit.
-
Removed
saveButtonProps
exported fromuseModalForm
becausesaveButtonProps
is already exported fromuseForm
hook in@pankod/refine-react-hook-form
.const { modal: { - saveButtonProps }, + saveButtonProps } = useModalForm();
-
#1923
45cd1f7097
Thanks @salihozdemir! - RemovedsaveButtonProps
exported fromuseModalForm
becausesaveButtonProps
is already exported fromuseForm
hook in@pankod/refine-react-hook-form
.const { modal: { - saveButtonProps }, + saveButtonProps } = useModalForm();
- #1866
9c72dae441
Thanks @salihozdemir! - ChangeisBackValidate
default value tofalse
foruseStepsForm
.
-
#1873
2deb19babf
Thanks @aliemir! - Removed dummy default values from internal contexts. Updated contexts:- Auth
- Access Control
- Notification
- Translation (i18n)
- unsavedWarn
BREAKING:
useGetLocale
hook now can returnundefined
instead of a fallback value ofen
in cases ofi18nProvider
beingundefined
. -
Updated dependencies [
2deb19babf
]:- @pankod/refine-core@3.23.2