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: add search box to hide columns popup #1128

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

lilyli9
Copy link
Contributor

@lilyli9 lilyli9 commented Jan 18, 2023

Adds a search bar to the hide columns popup to allow searching table column names with a keyword. Can select or hide all columns found with keyword.

Screen Shot 2023-01-18 at 11 09 31 AM

Screen Shot 2023-01-18 at 11 09 51 AM

Screen Shot 2023-01-18 at 11 24 07 AM

Screen Shot 2023-01-18 at 11 24 27 AM

@@ -61,4 +61,19 @@
.StatementResult-column-toggle-menu {
max-height: 200px;
overflow-y: auto;
.hide-column-search-bar-wrapper {
.SearchBar {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i see the same css repeated in #1136 (review)
can you make it a shared class under SearchBar.scss?

@@ -397,29 +399,57 @@ const ColumnToggleMenuButton: React.FC<{
}> = ({ columnNames, columnVisibility, toggleVisibility }) => {
const buttonRef = React.useRef<HTMLAnchorElement>();
const [showPopover, _, toggleShowPopover] = useToggleState(false);
const [filteredColumnNames, setFilteredColumnNames] = useState(columnNames);
Copy link
Collaborator

Choose a reason for hiding this comment

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

have filteredColumnNames a useMemo based on keyword and columnNames

@lilyli9 lilyli9 requested a review from czgu February 1, 2023 17:42
@czgu czgu merged commit 0e050e8 into pinterest:master Feb 1, 2023
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Apr 11, 2023
* feat: add search box to hide columns popup

* feat: add clear button to hide columns search bar

* chore: refactor filteredColumnNames and SearchBar
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* feat: add search box to hide columns popup

* feat: add clear button to hide columns search bar

* chore: refactor filteredColumnNames and SearchBar
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