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(advanced-search): make list menu resemble a dropdown #1243

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,6 +1,15 @@
<button class="menu-button" mat-button [matMenuTriggerFor]="rootMenu">
<span>{{ selectedItem ? selectedItem : 'Select list value' }}</span>
</button>
<div class="header">
Select a list value
</div>
<div class="dropdown" [matMenuTriggerFor]="rootMenu">
<div class="container">
<div class="label">{{ selectedItem ? selectedItem : 'Select a value' }}</div>
<div class="icon">
<mat-icon>arrow_drop_down</mat-icon>
</div>
</div>
<div class="line"></div>
</div>
<mat-menu #rootMenu="matMenu">
<span *ngFor="let child of list?.children">
<span *ngIf="child.children && child.children.length > 0">
Expand Down
@@ -1,4 +1,31 @@
.menu-button {
border: 1px solid;
padding: 0% 2%;
.header {
font-size: 14px;
}

.dropdown {
width: 44.2%;
cursor: pointer;
color: #737373;

.container {
display: inline-flex;
align-items: center;
box-sizing: border-box;
width: 100%;
padding: 16px 16px;

.label {
width: 100%;
color: rgba(32, 32, 32, 0.87);
}

.icon {
display: inline-flex;
width: 17px;
}
}

.line {
border-bottom: 1px solid;
}
}
Expand Up @@ -5,11 +5,12 @@ import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/material/menu';
import { ListItemComponent } from './list-item/list-item.component';
import { PropertyFormItem } from '../../../data-access/advanced-search-store/advanced-search-store.service';
import { MatIconModule } from '@angular/material/icon';

@Component({
selector: 'dasch-swiss-property-form-list-value',
standalone: true,
imports: [CommonModule, MatButtonModule, MatMenuModule, ListItemComponent],
imports: [CommonModule, MatButtonModule, MatIconModule, MatMenuModule, ListItemComponent],
templateUrl: './property-form-list-value.component.html',
styleUrls: ['./property-form-list-value.component.scss'],
})
Expand Down