Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: get columns for a table when setting the foreign keys #1784

Merged
merged 3 commits into from Dec 13, 2023

Conversation

wmontgomery
Copy link
Contributor

@wmontgomery wmontgomery commented Nov 15, 2023

Copy link
Collaborator

@rathboma rathboma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should just await in the getColumns method.

if (table !== null) {
if (!schema) {
tableData = this.tables.find((t: TableOrView) => escapeHtml(t.name) === table)
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should just add the async await to the getColumns method. Tabulator supports the valuesLookup parameter being a promise. See https://github.com/olifolkerd/tabulator/blob/0675efd4b7532d91415b9b5ac3bd11b602ba57cf/src/js/modules/Edit/List.js#L525

it calls valuesLookup and if the result is a promise, it awaits.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wmontgomery if you make this change we can merge this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing this now, will be making the change today

@rathboma rathboma merged commit 744d50a into master Dec 13, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Relations drop downs do not populate when a table's columns are not yet loaded in the vue store
2 participants