PR comments.
This commit is contained in:
parent
a8c96848a5
commit
4168b45a77
|
@ -81,12 +81,13 @@ export function createTablesStore() {
|
||||||
replaceTable(savedTable._id, savedTable)
|
replaceTable(savedTable._id, savedTable)
|
||||||
select(savedTable._id)
|
select(savedTable._id)
|
||||||
// make sure tables up to date (related)
|
// make sure tables up to date (related)
|
||||||
const tableIdsToFetch = []
|
let tableIdsToFetch = []
|
||||||
for (let column of Object.values(updatedTable?.schema || {})) {
|
for (let column of Object.values(updatedTable?.schema || {})) {
|
||||||
if (column.type === FIELDS.LINK.type) {
|
if (column.type === FIELDS.LINK.type) {
|
||||||
tableIdsToFetch.push(column.tableId)
|
tableIdsToFetch.push(column.tableId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tableIdsToFetch = [...new Set(tableIdsToFetch)]
|
||||||
// too many tables to fetch, just get all
|
// too many tables to fetch, just get all
|
||||||
if (tableIdsToFetch.length > 3) {
|
if (tableIdsToFetch.length > 3) {
|
||||||
await fetch()
|
await fetch()
|
||||||
|
@ -114,7 +115,6 @@ export function createTablesStore() {
|
||||||
indexes,
|
indexes,
|
||||||
}) => {
|
}) => {
|
||||||
let draft = cloneDeep(get(derivedStore).selected)
|
let draft = cloneDeep(get(derivedStore).selected)
|
||||||
console.log(draft)
|
|
||||||
|
|
||||||
// delete the original if renaming
|
// delete the original if renaming
|
||||||
// need to handle if the column had no name, empty string
|
// need to handle if the column had no name, empty string
|
||||||
|
|
Loading…
Reference in New Issue