Skip to content

Commit

Permalink
Merge pull request #247 from sohailamjad12/search_issue_26
Browse files Browse the repository at this point in the history
Karma Quest :Search issues resolved
  • Loading branch information
vishnubansaltarento authored Jun 27, 2024
2 parents 7b4060d + ff8a568 commit 3a6d3c2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{{data?.subTitle}}
</div>
<div class="flex flex-1 flex-row progress-icon">
<img src="/dashboard-assets/icons/radio_on.svg" />
<img src="/dashboard-assets/icons/accept_icon.svg" />
</div>
<div mat-dialog-actions class="flex flex-1 flex-row action">
<button mat-button class="primary" type="button">{{data?.primaryAction}}</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
<mat-form-field appearance="outline" class="w-full placeholder-text field-height" fxFlex="40">
<mat-select placeholder="Choose the Assignee" formControlName="assignee">
<input #search autocomplete="off" placeholder="Search" class="assigneeSearch"
(keyup)="searchValueData('assigneeText')" formControlName="assigneeText" matInput>
(keyup)="searchValueData('assigneeText')" (keydown.space)="$event.stopPropagation()" formControlName="assigneeText" matInput>
<mat-option *ngFor="let option of filteredAssigneeType" [value]="option">{{option.orgName}}</mat-option>

</mat-select>
Expand Down Expand Up @@ -243,7 +243,8 @@
</mat-select-trigger>
<mat-optgroup>
<mat-form-field floatLabel="never">
<input #search autocomplete="off" placeholder="Search" (keyup)="searchValueData('providerText')" formControlName="providerText" matInput>
<input #search autocomplete="off" placeholder="Search" (keyup)="searchValueData('providerText')" (keydown.space)="$event.stopPropagation()"
formControlName="providerText" matInput>
<button [disableRipple]="true" *ngIf="search.value" matSuffix mat-icon-button aria-label="Clear"
(click)="clearSearch($event,'providerText')"><mat-icon>close</mat-icon></button>
</mat-form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CompetencyViewComponent } from '../competency-view/competency-view.comp
import { ConfirmationPopupComponent } from '../confirmation-popup/confirmation-popup.component'
/* tslint:disable */
import _ from 'lodash'
import { debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators'
/* tslint:enable */

@Component({
Expand Down Expand Up @@ -186,12 +187,20 @@ export class RequestCopyDetailsComponent implements OnInit {

searchValueData(searchValue: any) {
if (searchValue === 'providerText') {
this.requestForm.controls['providerText'].valueChanges.subscribe((newValue: any) => {
this.requestForm.controls['providerText'].valueChanges.pipe(
debounceTime(100),
distinctUntilChanged(),
startWith(''),
).subscribe((newValue: any) => {
this.filteredRequestType = this.filterOrgValues(newValue, this.requestTypeData)
})
}
if (searchValue === 'assigneeText') {
this.requestForm.controls['assigneeText'].valueChanges.subscribe((newValue: any) => {
this.requestForm.controls['assigneeText'].valueChanges.pipe(
debounceTime(100),
distinctUntilChanged(),
startWith(''),
).subscribe((newValue: any) => {
this.filteredAssigneeType = this.filterOrgValues(newValue, this.requestTypeData)
})
}
Expand Down
1 change: 1 addition & 0 deletions src/dashboard-assets/icons/accept_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3a6d3c2

Please sign in to comment.