Closed aocenas closed 3 weeks ago
@joey-grafana
And do we want to do that? Like there are 2 cases
And then if we want and have 2. then I don't think we need 1.
request.range is updated but maybe we also need to update the raw value in request.range. I've also noticed there's a request.rawRange which I'm not sure why we're doing this!
Although the UI is not being updated so maybe it's a Redux state/update issue.
I am not sure I understand this but this is not how redux works. Like updating an object value directly that is part of state whether it's redux or react state is a bug (unless it's a Ref type). You create a weird undefined behaviour as you are skipping any rerendering or onChange hooks and reducers etc.
Fixes: https://github.com/grafana/grafana/issues/87608
The moment methods to modify the date return an object so it seems like they should be immutable but actually also modify the date object. So if the object is passed for example from Explore we modify the explore state as well without going through the correct redux updates which creates issues.