Skip to content

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

Merged
czgu merged 4 commits into
pinterest:masterfrom
czgu:autshow
Dec 20, 2022
Merged

czgu merged 4 commits into
pinterest:masterfrom
czgu:autshow

Conversation

@czgu

@czgu czgu commented Dec 20, 2022

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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