cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

ui: move `latestQuery`, `latestFormattedQuery` from redux to local state

Open xinhaoz opened this issue 3 years ago • 1 comments
trafficstars

Previously, the fields latestQuery and latestFormattedQuery representing the latest non-empty query string for a statement viewed from the detaisl page was being stored in redux. The purpose of these fields was to preserve the query when changing tabs in the stmt details page. Saving this in the redux store was unnecessary and so this commit moves these fields to the stmt details local state.

Release note: None

xinhaoz avatar Sep 22 '22 20:09 xinhaoz

This change is Reviewable

cockroach-teamcity avatar Sep 22 '22 20:09 cockroach-teamcity

Yes, that behaviour is still preserved here, we're doing the exact same thing but in the component state instead of redux since this info isn't needed anywhere else in the app. The state is only updated if we receive a different, non-empty query. Included a loom!

xinhaoz avatar Sep 23 '22 19:09 xinhaoz

bors r+

xinhaoz avatar Sep 27 '22 15:09 xinhaoz

Build succeeded:

craig[bot] avatar Sep 27 '22 16:09 craig[bot]