Merge pull request #11137 from Budibase/fix/table-fetch-ui

Table fetch UI - fix extra tables being listed
This commit is contained in:
Michael Drury 2023-07-05 11:07:53 +01:00 committed by GitHub
commit 496c79067a
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { derived, writable, get } from "svelte/store" import { derived, writable, get } from "svelte/store"
import { notifications } from "@budibase/bbui" import { notifications } from "@budibase/bbui"
import { datasources, ImportTableError } from "stores/backend" import { datasources, ImportTableError, tables } from "stores/backend"
export const createTableSelectionStore = (integration, datasource) => { export const createTableSelectionStore = (integration, datasource) => {
const tableNamesStore = writable([]) const tableNamesStore = writable([])
@ -27,7 +27,7 @@ export const createTableSelectionStore = (integration, datasource) => {
try { try {
await datasources.updateSchema(datasource, get(selectedTableNamesStore)) await datasources.updateSchema(datasource, get(selectedTableNamesStore))
await tables.fetch()
notifications.success(`Tables fetched successfully.`) notifications.success(`Tables fetched successfully.`)
await onComplete() await onComplete()
} catch (err) { } catch (err) {