Skip to content

Commit

Permalink
Cleanup search input
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Dec 9, 2024
1 parent 0ac6c37 commit 2ae8b39
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
11 changes: 7 additions & 4 deletions ui/src/components/search/search-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ export class SearchInput extends LitElementI18n {

protected updated(changedProperties: PropertyValues<this>): void {
super.updated(changedProperties);
if (this.isActive) {
this.classList.add('is-active');
} else {
this.classList.remove('is-active');
console.log(changedProperties);
if (changedProperties.has('isActive' as keyof SearchInput)) {
if (this.isActive) {
this.classList.add('is-active');
} else {
this.classList.remove('is-active');
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions ui/src/ngm-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ export class NgmApp extends LitElementI18n {
this.queryManager = new QueryManager(viewer);

this.sidebar = this.querySelector('ngm-side-bar') as SideBar | null;

// setupSearch(viewer, this.querySelector('ga-search')!, sideBar);
}

removeLoading() {
Expand Down
5 changes: 2 additions & 3 deletions ui/src/style/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ header {
--header-padding-v: 10px;
padding: var(--header-padding-v) var(--header-padding-r) var(--header-padding-v) var(--header-padding-l);

--content-width: calc(100vw - var(--header-padding-l) - var(--header-padding-r));
--content-width: calc(100vw - var(--header-padding-l) - var(--header-padding-r));
--suffix-width: 90px;
}

@media (min-width: 700px) {
header {
--header-padding-v: 16px;
--suffix-width: 90px;
justify-content: flex-start;
}
}
Expand Down Expand Up @@ -87,4 +86,4 @@ header .ngm-header-suffix {
width: unset;
max-width: unset;
}
}
}
1 change: 0 additions & 1 deletion ui/src/style/ngm-side-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ ngm-side-bar {
overflow-y: auto;
overflow-x: hidden;
padding-bottom: 40px;
/* scrollbar-color: #868E96 #F1F3F5; */
}

.ngm-menu-1 > div.ngm-active-section > div:nth-child(1),
Expand Down

0 comments on commit 2ae8b39

Please sign in to comment.