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

Edit action does not repopulate record on response #452

Closed
JonaszJestem opened this issue May 12, 2020 · 1 comment
Closed

Edit action does not repopulate record on response #452

JonaszJestem opened this issue May 12, 2020 · 1 comment
Milestone

Comments

@JonaszJestem
Copy link
Contributor

Describe the bug
I execute regular edit action in AdminBro using useRecord().submit
The request is
POST /admin/api/resources/Offer/records/5eba5f8a3b808937e4d26cd0/edit
with form data:
{owner: 5ea7f942acdc9f042a3d2bee}

And the response is containing record.params with
{owner: "5ea7f942acdc9f042a3d2bee"}
but record.populated in the response is still:
{owner: {id: '5eb106786d6779056ddd6c91'}}

Installed libraries and their versions

"admin-bro": "^2.3.1",
"admin-bro-expressjs": "^2.0.3",
"admin-bro-firebase-functions": "^2.1.1",
"admin-bro-mongoose": "^0.5.2",

To Reproduce
Steps to reproduce the behavior:

  1. Go to record edit page
  2. Click on select and select different populated value
  3. Save the record without refreshing the page using useRecord hook
  4. Record coming back has old populated value

Expected behavior
Values should be populated again

Screenshots
image

wojtek-krysiak added a commit that referenced this issue Aug 7, 2020
…ction

fix: populate record after editfixes #452
github-actions bot pushed a commit that referenced this issue Aug 7, 2020
# [3.0.0-beta.14](v3.0.0-beta.13...v3.0.0-beta.14) (2020-08-07)

### Bug Fixes

* populate record after editfixes [#452](#452) ([0ce3e63](0ce3e63))
github-actions bot pushed a commit that referenced this issue Aug 22, 2020
# [3.0.0](v2.9.0...v3.0.0) (2020-08-22)

### Bug Fixes

* add missing ParamsType type export ([a704350](a704350))
* bring back old package name ([dd03f15](dd03f15))
* bump design-system ([dfe5996](dfe5996))
* design system types ([f96170c](f96170c))
* empty payload error happend in hapi plugin ([f5775dd](f5775dd))
* error when use AdminBro.bundle form an another package ([2ada007](2ada007))
* error when xxxProperties were empty in merge ([1db1235](1db1235))
* errors with mergin resource options ([65be2a6](65be2a6))
* fix ts exports ([4ad29f3](4ad29f3))
* make components backward compatible ([773341e](773341e))
* move npmrc to the root ([c295bd2](c295bd2))
* move RegisteredAdapters to globak scope ([0325a2a](0325a2a))
* populate record after editfixes [#452](#452) ([0ce3e63](0ce3e63))
* remove babel from rollup ([335c6b6](335c6b6))
* remove design-system from typings ([4fab567](4fab567))
* use latest design system ([7bbb2f3](7bbb2f3))

### Code Refactoring

* ⚡ rename package to @admin-bro/core ([b988edb](b988edb))

### Features

* 🔥 extract design-system to a separate package ([3da18e6](3da18e6))
* admin-bro features ([fcd13e4](fcd13e4)), closes [#431](#431)
* allow to setup theme base on the user ([baa28f5](baa28f5)), closes [#511](#511)
* get bundled design-system to the head ([d20aa49](d20aa49))
* hooks can be passed as an array ([7e23ce0](7e23ce0)), closes [#426](#426)
* improve performance of text inputs ([82f6db4](82f6db4))

### improvement

* remove name from property options ([69b342a](69b342a)), closes [#448](#448)
* remove not needed BaseResource#name ([4848a2d](4848a2d))

### BREAKING CHANGES

* name in propery options doesn't affect property anymore
* now base resource does not have a name() property
* all imports should be changes to @admin-bro/core
* now users should use @admin-bro/design-system
@wojtek-krysiak wojtek-krysiak added this to the 3.3 milestone Sep 3, 2020
@wojtek-krysiak
Copy link
Contributor

I've just tested it on the latest beta (v3.3.0-beta.5) and it works just fine. Maybe its because I rewrote populator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants