Skip to content

Commit 458e8ae

Browse files
ci(changesets): version packages (#23)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 7897bc1 commit 458e8ae

6 files changed

Lines changed: 30 additions & 18 deletions

File tree

.changeset/fix-create-modal-cached-data.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/core/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @refinedev/core
22

3+
## 5.1.2
4+
5+
### Patch Changes
6+
7+
- [#22](https://github.com/athenagroup/refine/pull/22) [`9153161d78251e1524302a00d79fa7136464f239`](https://github.com/athenagroup/refine/commit/9153161d78251e1524302a00d79fa7136464f239) Thanks [@Woutuuur](https://github.com/Woutuuur)! - fix(core, react-hook-form): prevent cached show-page data from overwriting create modal defaultValues
8+
9+
When opening a create modal on a show page for the same resource, the form's `defaultValues` were overwritten by cached data from the show page's `useOne` query. This happened because `useForm` passed the URL-derived `id` to `useOne` even for create actions, causing a query key collision with the cached entry.
10+
11+
- **core:** Don't pass `id` to `useOne` for create actions, preventing the cache key collision at the source.
12+
- **react-hook-form:** Guard the `useModalForm` visibility reset effect against create actions.
13+
314
## 5.1.1
415

516
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenagroup/refine-core",
3-
"version": "5.1.1",
3+
"version": "5.1.2",
44
"private": false,
55
"description": "Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.",
66
"repository": {

packages/react-hook-form/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @refinedev/react-hook-form
22

3+
## 5.0.6
4+
5+
### Patch Changes
6+
7+
- [#22](https://github.com/athenagroup/refine/pull/22) [`9153161d78251e1524302a00d79fa7136464f239`](https://github.com/athenagroup/refine/commit/9153161d78251e1524302a00d79fa7136464f239) Thanks [@Woutuuur](https://github.com/Woutuuur)! - fix(core, react-hook-form): prevent cached show-page data from overwriting create modal defaultValues
8+
9+
When opening a create modal on a show page for the same resource, the form's `defaultValues` were overwritten by cached data from the show page's `useOne` query. This happened because `useForm` passed the URL-derived `id` to `useOne` even for create actions, causing a query key collision with the cached entry.
10+
11+
- **core:** Don't pass `id` to `useOne` for create actions, preventing the cache key collision at the source.
12+
- **react-hook-form:** Guard the `useModalForm` visibility reset effect against create actions.
13+
314
## 5.0.5
415

516
### Patch Changes

packages/react-hook-form/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenagroup/refine-react-hook-form",
3-
"version": "5.0.5",
3+
"version": "5.0.6",
44
"private": false,
55
"description": "refine offers a React Hook Form adapter that allows you to use the React Hook Form library with refine.",
66
"repository": {

pnpm-lock.yaml

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)