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

feat: Make exact table search result auto show up #1106

Merged
merged 4 commits into from
Dec 20, 2022
Merged

Conversation

czgu
Copy link
Collaborator

@czgu czgu commented Dec 20, 2022

If you enter the table name exactly, the table would auto show up in the bottom bar
image

@czgu czgu marked this pull request as ready for review December 20, 2022 01:50
Comment on lines +26 to +30
return dataTables.find(
(table) =>
table.name === searchStringTable &&
table.schema === searchStringSchema
)?.id;
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be simpler to find by joining the schema and name?

dataTables.find(
            (table) =>
                `${table.schema}.${table.name}` === searchString.trim()
        )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point, i also wanted to include filters as well. Updated the PR

@czgu czgu merged commit d543644 into pinterest:master Dec 20, 2022
@czgu czgu deleted the autshow branch December 20, 2022 19:58
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Feb 28, 2023
* feat: Make exact table search result auto show up

* do not let user double select

* Mix exact match and user selected table together

* also incorporate filters into logic
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* feat: Make exact table search result auto show up

* do not let user double select

* Mix exact match and user selected table together

* also incorporate filters into logic
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.

2 participants