Refresh on the Datagrid number update

Hi I have no refresh when I change the number on the array with a plus and minus, it works on the first one, but not on the another line. The number change on the backoffice but don’t change on the front.

it’s a bug of weweb and I did something wrong ?

1 Like

Hi, I have a similar issue. I’m trying to change the text color based on a row status_id. When the status gets updated, the color of the text doesn’t change.
It’s almost like there is no “refresh” of the datagrid even though I’m refetching the whole collection after the status update.

Can someone help?

To get around this issue, instead of doing a binding on the row context, I’m doing this in JS:

  • search for the specific record in the collection based on the current row id
  • return the correct value based on a condition

This workaround is ok but it would be great if the datagrid context was refreshed after the collection is refetched.

Hi,

I’m not sure, but as I see it you need to update the entire data set you put inside Data grid.

Presumably, the quantity buttons in @laurentvienne’s videos change the value in the input field, but don’t actually change the data set, so no change is saved.

What you need to do is to modify the entire data set in your backend (like save all the changes to the database and refetch the collection) or if you want do it on Weweb side just find the specific object inside data set array then find the specific key-value pair inside that object and modify it. But be aware that it is only a front-end change, and after refetching your data set it will be restored to its initial state.