10 examples of 'ngx-mat-select-search' in JavaScript

Every line of 'ngx-mat-select-search' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
47ngOnInit() {
48 this.filteredOptions = this.formControl.valueChanges
49 .pipe(
50 startWith(''),
51 map(value => {
52 if (!value) {
53 return;
54 }
55 return typeof value === 'string' ? value : value[this.showValueOf]
56 }),
57 map(val => val ? this._filter(val) : this.options.slice())
58 );
59}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

206ngAfterViewInit() {
207 this.setOverlayClass();
208 this.translateService.get('general.search').subscribe((txt: string) => { this.placeholderLabel = txt });
209 this.translateService.get('general.search-notfound').subscribe((txt: string) => { this.noEntriesFoundLabel = txt });
210}
84ngOnInit() {
85 this._input.ngControl.valueChanges
86 .pipe(debounceTime(this.debounce), skip(1))
87 .subscribe((/**
88 * @param {?} value
89 * @return {?}
90 */
91 (value) => {
92 this._searchTermChanged(value);
93 }));
94}
379onInputChange(value) {
380 const valueChanged = value !== this._value;
381 if (valueChanged) {
382 this.initMultiSelectedValues();
383 this._value = value;
384 this.onChange(value);
385 this.change.emit(value);
386 }
387}
242ngOnInit() {
243 if (this.dropdownValues) {
244 this.displayedValues = this.dropdownValues;
245 }
246
247 if (isDevMode()) {
248 console.warn('Search Input is deprecated. Please use Combobox instead. Visit the fundamental-ngx wiki for more information.')
249 }
250}
76ngOnInit() {
77 this.termService.search(this.queryValue, this.termResultsReturnedSource);
78 this.queryInputValue = this.queryValue;
79}
58ngOnInit() : void {
59 if(!this.observable){
60 this.observable = this.searchTerms
61 .debounceTime(this.delay)
62 .distinctUntilChanged()
63 this.observer = this.observable.subscribe(val => {
64 this.onChange.emit(val)
65 })
66 }
67 setTimeout(() => this.evalAttributes(), 20);
68}
37ngOnInit(): void {
38 combineLatest(this.route.queryParamMap, this.state.select(state => state.entities.tag))
39 .pipe(takeUntil(this.destroyed$))
40 .subscribe(([paramMap]) => {
41 this.searchParamsChanged(paramMap);
42 });
43
44 this.state
45 .select(state => state.tags.tags)
46 .pipe(takeUntil(this.destroyed$))
47 .subscribe(tags => {
48 this.allTags = tags.map(uuid => this.entities.getTag(uuid)).filter(notNullOrUndefined);
49 });
50}
219ngOnInit(): void {
220 const inputValues$ = this._valueChanges.pipe(tap(value => {
221 this._inputValueBackup = this.showHint ? value : null;
222 this._onChange(this.editable ? value : undefined);
223 }));
224 const results$ = inputValues$.pipe(this.ngbTypeahead);
225 const userInput$ = this._resubscribeTypeahead.pipe(switchMap(() => results$));
226 this._subscription = this._subscribeToUserInput(userInput$);
227}
138ngOnInit() {
139 this.advancedSearchObject$ = this.advancedSearchQuery.advancedSearch$;
140 this.hasAdvancedSearchText$ = this.advancedSearchQuery.hasAdvancedSearchText$;
141 this.values$ = this.searchQuery.searchText$;
142 this.basicSearchText$ = this.searchQuery.basicSearchText$;
143 this.activatedRoute.queryParams.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => this.parseParams());
144 this.searchService.toSaveSearch$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(toSaveSearch => {
145 if (toSaveSearch) {
146 this.saveSearchFilter();
147 this.searchService.toSaveSearch$.next(false);
148 }
149 });
150 this.searchQuery.searchText$
151 .pipe(
152 debounceTime(formInputDebounceTime),
153 distinctUntilChanged(),
154 takeUntil(this.ngUnsubscribe)
155 )
156 .subscribe((searchText: string) => {
157 this.onKey(searchText);
158 });
159 this.hits = [];
160
161 this.aNDSplitFilterText$ = this.advancedSearchQuery.aNDSplitFilterText$;
162 this.aNDNoSplitFilterText$ = this.advancedSearchQuery.aNDNoSplitFilterText$;
163 this.oRFilterText$ = this.advancedSearchQuery.oRFilterText$;
164 this.nOTFilterText$ = this.advancedSearchQuery.nOTFilterText$;
165 // The reason why we have this here is because the updatePermalink function isn't in a service...
166 // because the function modifies something that's in this component and not in the state.
167 // TODO:move it to the state
168 this.advancedSearchQuery.advancedSearch$.pipe(takeUntil(this.ngUnsubscribe)).subscribe(() => {
169 this.updatePermalink();
170 });
171}

Related snippets