Skip to content

Commit

Permalink
configuration select field mapping dropdown and search fix (#564)
Browse files Browse the repository at this point in the history
configuration select field mapping dropdown and search fix
  • Loading branch information
DhaaraniCIT authored Feb 15, 2024
1 parent 04c8709 commit 64beb32
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ <h5 *ngIf="(formControllerName === 'reimbursableExportType' || formControllerNam
<div #textElement
[ngStyle]="{'white-space': 'nowrap', 'overflow': 'hidden', 'text-overflow': 'ellipsis', 'max-width': '16rem'}"
[pTooltip]="isOverflowing(textElement) ? options.value: null" tooltipPosition="top">
{{options.value}}
{{options[optionLabel]}}
</div>
</ng-template>
<ng-template *ngIf="!isAdvanceSearchEnabled" pTemplate="filter" let-dropdownOptions="options">
<app-search [form]="form" [placeholder]="'Search'" [styleClasses]="'tw-w-[100%] tw-h-dropdown-option-height tw-bg-white'" (handleSimpleSearch)="simpleSearch($event)"></app-search>
<app-search [form]="form" [isDropdown]="true" [placeholder]="'Search'" [styleClasses]="'tw-w-[100%] tw-h-dropdown-option-height tw-bg-white'" (handleSimpleSearch)="simpleSearch($event)"></app-search>
</ng-template>
</p-dropdown>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
</ng-template>
<ng-template pTemplate="filter" let-options="options">
<app-search [form]="form" [placeholder]="'Search'" [styleClasses]="'tw-w-[100%] tw-h-dropdown-option-height tw-bg-white'" (handleSimpleSearch)="simpleSearch($event)"></app-search>
<app-search [form]="form" [placeholder]="'Search'" [isDropdown]="true" [styleClasses]="'tw-w-[100%] tw-h-dropdown-option-height tw-bg-white'" (handleSimpleSearch)="simpleSearch($event)"></app-search>
</ng-template>
</p-dropdown>
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span [formGroup]="form" [class]="'custom-search-field ' + styleClasses" [ngStyle]="{ 'border-color': isSearchFocused ? 'var(--search-focused-filled-border)' : 'var(--search-default-border)' }">
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-text-icon-muted tw-pr-8-px'"></app-svg-icon>
<app-svg-icon [isTextColorAllowed]="true" [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="isSearchFocused && isDropdown ? '!tw-text-search-focused-search-icon !tw-pr-8-px' : '!tw-text-icon-muted !tw-pr-8-px'"></app-svg-icon>
<input [formControlName]="formControllerName" class="tw-pb-1 tw-pt-1 tw-text-14-px tw-text-search-default-filled-text" type="text" (focus)="isSearchFocused = true" (blur)="isSearchFocused = false" [placeholder]="placeholder" />
<app-svg-icon *ngIf="form.value[formControllerName]" (iconClick)="clearSearch()" [svgSource]="'cross-medium'" [c1SvgSource]="'grv-cross-filled-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-cursor-pointer tw-text-icon-muted'"></app-svg-icon>
</span>
2 changes: 2 additions & 0 deletions src/app/shared/components/input/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export class SearchComponent implements OnInit {

@Input() formControllerName: string = 'searchOption';

@Input() isDropdown:boolean = false;

@Output() handleSimpleSearch = new EventEmitter<any>();

isSearchFocused: boolean;
Expand Down
2 changes: 2 additions & 0 deletions src/assets/themes/fyle/fdl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,7 @@
--calendar-date-default-text-color: var(--text-secondary);

--tooltip-bg: var(--bg-secondary);

--search-focused-search-icon: var(--icon-muted);
}
}

0 comments on commit 64beb32

Please sign in to comment.