feat(search): conditionally render search input and add showSearchInput property

This commit is contained in:
4gray committed 2026-02-24 19:17:08 +01:00
1 parent 5e46731d26
commit ae5ee88495
3 files changed
+11 -7

No files matched your search

@@ -33,12 +33,14 @@
</div>
</div>
<div class="search-input-container">
<app-search-form
[searchTerm]="searchTerm()"
(searchTermChange)="onSearchTermChange($event)"
/>
</div>
@if (showSearchInput()) {
<div class="search-input-container">
<app-search-form
[searchTerm]="searchTerm()"
(searchTermChange)="onSearchTermChange($event)"
/>
</div>
}
<!-- Subheader slot (info notes, secondary controls) -->
<ng-content select="[subheader]" />
@@ -27,7 +27,6 @@
position: sticky;
top: 0;
z-index: 100;
background: var(--background, var(--mat-sidenav-content-background-color, #fff));
padding: 20px 0 10px 0;
margin-bottom: 2px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
@@ -47,6 +47,9 @@ export class SearchLayoutComponent {
/** Whether to show results count */
readonly showResultsCount = input<boolean>(true);
/** Whether to show the inline search input */
readonly showSearchInput = input<boolean>(true);
/** Minimum characters required for search */
readonly minSearchLength = input<number>(3);