# Refresh data after 'update'

**URL:** <https://community.forestadmin.com/t/refresh-data-after-update/604>\
**Category:** Help me!\
**Created:** [July 3, 2020, 4:17pm UTC](https://community.forestadmin.com/t/refresh-data-after-update/604 "2020-07-03T16:17:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![slow\_monkey](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/slow_monkey/32/413_2.png) [@slow\_monkey](https://community.forestadmin.com/u/slow_monkey)\
**Post date:** [July 3, 2020, 4:17pm UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/1 "2020-07-03T16:17:17Z")

</div>

Hello Forest Admin Team,

Could you please advise, how can I refresh the data after the ‘update’ event?  
It seems like Forest Admin UI doesn’t consider what is sent in PUT response data and this is fair enough. But in that case how I can refresh the data after PUT.

![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/fb5aba20d43ad47b3b343a94ff08f4ba45429ef6.png)

This is needed when I’m handling PUT request manually and preparing the data (changing) before saving. UI will show user input (which is different from the data that was prepared and saved) and there is no way to show actual saved data since GET request is not triggered immediately.

## Expected behavior

PUT + GET or consider the data from the response on PUT request.

## Actual behavior

Only PUT is triggered. Didn’t find a way to refresh the data right after updating (except refreshing the page).

## Context

CRUD Operations (PUT enhancements).

---

<div class="post-metadata">

**Author:** ![rap2h](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/rap2h/32/25_2.png) [@rap2h](https://community.forestadmin.com/u/rap2h)\
**Post date:** [July 6, 2020, 3:46pm UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/2 "2020-07-06T15:46:08Z")

</div>

Hi @slow_monkey

I just checked on my side and it seems to work, but I may have missed something. Here is what I tried:

1. I updated a route of one of my models

```javascript
router.put('/customers/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => {
  request.body.data.attributes.avatar = 'MY NEW VALUE';
  next();
});

```

1. Then I restarted my backend and tried to edit from the interface (detailed view and table view) and it worked (i.e data is refreshed)

Demo below:

![ezgif.com-video-to-gif (10)](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/fe5be1e7b1666afa6c31b81278e7b680171d03bf.gif)

I may have missed something. Could you post a simplified example of your code so I could reproduce the issue?

---

<div class="post-metadata">

**Author:** ![slow\_monkey](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/slow_monkey/32/413_2.png) [@slow\_monkey](https://community.forestadmin.com/u/slow_monkey)\
**Post date:** [July 6, 2020, 4:35pm UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/3 "2020-07-06T16:35:49Z")

</div>

Hello,

Indeed, with primitive types, it works perfectly fine. But I have an array of integers (tuple with min-max range).

Structure field code:

time: {  
type: DataTypes.ARRAY(DataTypes.INTEGER),  
},

Route code:

![image.png](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/c4f9983e69ab9d14caa12fdf4f222baee3d9723d.png)

Entered the range:

 ![image.png](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/262ddb39642ab3d57fa41dfab09cb268ffac054a.png)

Result (shows previous value, not saved value, and not even value that was recently entered):

 ![image.png](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/593b72cf2c09ed0550e4b51cccb9a7281dc8d384.png)

After page refresh, it shows the value set in the route handler.  
Could you please check?

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [July 7, 2020, 8:35am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/4 "2020-07-07T08:35:36Z")

</div>

Hi @slow_monkey 👋, thank you for your feedback, I’m able to reproduce.  
I will transfert to the team and work on a fix

---

<div class="post-metadata">

**Author:** ![slow\_monkey](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/slow_monkey/32/413_2.png) [@slow\_monkey](https://community.forestadmin.com/u/slow_monkey)\
**Post date:** [July 13, 2020, 9:13am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/5 "2020-07-13T09:13:04Z")

</div>

Hello @Arnaud_Moncel, any updates on this topic?

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [July 13, 2020, 10:28am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/6 "2020-07-13T10:28:32Z")

</div>

Hi @slow_monkey,  
Here is the ticket, the team is currently working on this:

https://share.clickup.com/t/h/6en4gg/SX9QFR7NAO03GU2

We will let you know once it is released 🙏

---

<div class="post-metadata">

**Author:** ![slow\_monkey](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/slow_monkey/32/413_2.png) [@slow\_monkey](https://community.forestadmin.com/u/slow_monkey)\
**Post date:** [July 13, 2020, 10:45am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/7 "2020-07-13T10:45:07Z")

</div>

Got it, thanks!

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![anon37102731](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anon37102731](https://community.forestadmin.com/u/anon37102731)\
**Post date:** [July 16, 2020, 9:19am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/8 "2020-07-16T09:19:36Z")

</div>

Hi @slow_monkey,

A fix for the issue you reported should have been released now.

Let us know is you experience any casualties regarding this concern.

Best regards

---

<div class="post-metadata">

**Author:** ![slow\_monkey](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/slow_monkey/32/413_2.png) [@slow\_monkey](https://community.forestadmin.com/u/slow_monkey)\
**Post date:** [July 16, 2020, 9:59am UTC](https://community.forestadmin.com/t/refresh-data-after-update/604/9 "2020-07-16T09:59:55Z")

</div>

Hello,

It seems working well. Thank you!

Kind regards,  
Mark
