diff --git a/ui/src/data_resources/components/audit_item.vue b/ui/src/data_resources/components/audit_item.vue index 52087fc7..4bffaf52 100644 --- a/ui/src/data_resources/components/audit_item.vue +++ b/ui/src/data_resources/components/audit_item.vue @@ -147,7 +147,7 @@ export default { this.$emit('revert', result.data.data) }).catch((error) => { - console.log(error) + console.error(error) this.$Message.error(`${this.i18n.action_has_failed_with_code} ${error.response.status}`) }) diff --git a/ui/src/data_resources/components/resource.vue b/ui/src/data_resources/components/resource.vue index 061d0834..a9b4c39b 100644 --- a/ui/src/data_resources/components/resource.vue +++ b/ui/src/data_resources/components/resource.vue @@ -61,6 +61,7 @@ /> { + if (typeof history.state.resourceTableScrollTop === 'number') { + this.$nextTick(() => { + this.$refs.table.scrollTo(history.state.resourceTableScrollTop, history.state.resourceTableScrollLeft) + }) + } + }) }, methods: { widthLessThan, diff --git a/ui/src/data_resources/pages/base.vue b/ui/src/data_resources/pages/base.vue index c3d49b86..ff2c5daa 100644 --- a/ui/src/data_resources/pages/base.vue +++ b/ui/src/data_resources/pages/base.vue @@ -33,6 +33,7 @@ /> { diff --git a/ui/src/index.js b/ui/src/index.js index abf7da97..5c6cb6a8 100644 --- a/ui/src/index.js +++ b/ui/src/index.js @@ -122,3 +122,7 @@ document.addEventListener('DOMContentLoaded', () => { subscribeToNotifications() }) + +window.onbeforeunload = () => { + history.replaceState({ ...history.state, resourceTableScrollTop: 0, resourceTableScrollLeft: 0 }, document.title, location.href) +}