Skip to content

Commit

Permalink
fix: Avoid full table/view list reloading on insert
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Aug 5, 2024
1 parent d59e9c2 commit d2b2086
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,11 @@ export default new Vuex.Store({
displayError(e, t('tables', 'Could not insert table.'))
return false
}
if (data.template !== 'custom') {
await dispatch('loadTablesFromBE')
await dispatch('loadViewsSharedWithMeFromBE')
} else {
const tables = state.tables
tables.push(res.data)
commit('setTables', tables)
}

const tables = state.tables
tables.push(res.data)
commit('setTables', tables)

return res.data
},
async loadTablesFromBE({ commit, state }) {
Expand Down

0 comments on commit d2b2086

Please sign in to comment.