Skip to content

Commit 3a6d3c2

Browse files
Merge pull request #247 from sohailamjad12/search_issue_26
Karma Quest :Search issues resolved
2 parents 7b4060d + ff8a568 commit 3a6d3c2

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

project/ws/app/src/lib/routes/home/routes/request/confirmation-popup/confirmation-popup.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{{data?.subTitle}}
5555
</div>
5656
<div class="flex flex-1 flex-row progress-icon">
57-
<img src="/dashboard-assets/icons/radio_on.svg" />
57+
<img src="/dashboard-assets/icons/accept_icon.svg" />
5858
</div>
5959
<div mat-dialog-actions class="flex flex-1 flex-row action">
6060
<button mat-button class="primary" type="button">{{data?.primaryAction}}</button>

project/ws/app/src/lib/routes/home/routes/request/request-copy-details/request-copy-details.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
<mat-form-field appearance="outline" class="w-full placeholder-text field-height" fxFlex="40">
214214
<mat-select placeholder="Choose the Assignee" formControlName="assignee">
215215
<input #search autocomplete="off" placeholder="Search" class="assigneeSearch"
216-
(keyup)="searchValueData('assigneeText')" formControlName="assigneeText" matInput>
216+
(keyup)="searchValueData('assigneeText')" (keydown.space)="$event.stopPropagation()" formControlName="assigneeText" matInput>
217217
<mat-option *ngFor="let option of filteredAssigneeType" [value]="option">{{option.orgName}}</mat-option>
218218

219219
</mat-select>
@@ -243,7 +243,8 @@
243243
</mat-select-trigger>
244244
<mat-optgroup>
245245
<mat-form-field floatLabel="never">
246-
<input #search autocomplete="off" placeholder="Search" (keyup)="searchValueData('providerText')" formControlName="providerText" matInput>
246+
<input #search autocomplete="off" placeholder="Search" (keyup)="searchValueData('providerText')" (keydown.space)="$event.stopPropagation()"
247+
formControlName="providerText" matInput>
247248
<button [disableRipple]="true" *ngIf="search.value" matSuffix mat-icon-button aria-label="Clear"
248249
(click)="clearSearch($event,'providerText')"><mat-icon>close</mat-icon></button>
249250
</mat-form-field>

project/ws/app/src/lib/routes/home/routes/request/request-copy-details/request-copy-details.component.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { CompetencyViewComponent } from '../competency-view/competency-view.comp
77
import { ConfirmationPopupComponent } from '../confirmation-popup/confirmation-popup.component'
88
/* tslint:disable */
99
import _ from 'lodash'
10+
import { debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators'
1011
/* tslint:enable */
1112

1213
@Component({
@@ -186,12 +187,20 @@ export class RequestCopyDetailsComponent implements OnInit {
186187

187188
searchValueData(searchValue: any) {
188189
if (searchValue === 'providerText') {
189-
this.requestForm.controls['providerText'].valueChanges.subscribe((newValue: any) => {
190+
this.requestForm.controls['providerText'].valueChanges.pipe(
191+
debounceTime(100),
192+
distinctUntilChanged(),
193+
startWith(''),
194+
).subscribe((newValue: any) => {
190195
this.filteredRequestType = this.filterOrgValues(newValue, this.requestTypeData)
191196
})
192197
}
193198
if (searchValue === 'assigneeText') {
194-
this.requestForm.controls['assigneeText'].valueChanges.subscribe((newValue: any) => {
199+
this.requestForm.controls['assigneeText'].valueChanges.pipe(
200+
debounceTime(100),
201+
distinctUntilChanged(),
202+
startWith(''),
203+
).subscribe((newValue: any) => {
195204
this.filteredAssigneeType = this.filterOrgValues(newValue, this.requestTypeData)
196205
})
197206
}
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)