From 012dc73f4cdd0c11cf84ced29296a21673c6362c Mon Sep 17 00:00:00 2001 From: Esteban Gehring Date: Mon, 17 May 2021 13:55:59 +0200 Subject: [PATCH] prepare release 3.2.1 (#318) * prepare release 3.2.1 * Revert "fix expression changed error (#313)" This reverts commit a545df1c3001af08f5a2d05ed51a809d33fb040b. * prepare release 3.2.1 --- CHANGELOG.md | 6 ++++++ package-lock.json | 2 +- package.json | 2 +- src/app/mat-select-search/mat-select-search.component.ts | 9 +++++---- .../mat-select-search/ngx-mat-select-search.module.ts | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b115f84..cc512cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.2.1 +* Enhancement: Add compatibility with `@angular/core`: `^12.0.0`, `@angular/material`: `^12.0.0` +* Enhancement: Improve select all example + + Thanks to @achilehero + ## 3.2.0 * Feature: allow disabling the clear search button with `[hideClearSearchButton]="true"` [#290](https://github.com/bithost-gmbh/ngx-mat-select-search/issues/290) diff --git a/package-lock.json b/package-lock.json index 3ff6e35..8ed256c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ngx-mat-select-search", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5d4ad24..14900b7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "$schema": "./node_modules/ng-packagr/package.schema.json", "name": "ngx-mat-select-search", "description": "Angular component providing an input field for searching / filtering MatSelect options of the Angular Material library.", - "version": "3.2.0", + "version": "3.2.1", "license": "MIT", "scripts": { "ng": "ng", diff --git a/src/app/mat-select-search/mat-select-search.component.ts b/src/app/mat-select-search/mat-select-search.component.ts index b987ee3..0c61b0a 100755 --- a/src/app/mat-select-search/mat-select-search.component.ts +++ b/src/app/mat-select-search/mat-select-search.component.ts @@ -25,16 +25,19 @@ import { } from '@angular/core'; import { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; import { _countGroupLabelsBeforeOption, MatOption } from '@angular/material/core'; -import { MatSelect, SELECT_PANEL_MAX_HEIGHT } from '@angular/material/select'; +import { MatSelect } from '@angular/material/select'; import { MatFormField } from '@angular/material/form-field'; import { A, DOWN_ARROW, END, ENTER, ESCAPE, HOME, NINE, SPACE, UP_ARROW, Z, ZERO, } from '@angular/cdk/keycodes'; import { ViewportRuler } from '@angular/cdk/scrolling'; import { LiveAnnouncer } from '@angular/cdk/a11y'; import { BehaviorSubject, combineLatest, Observable, of, Subject } from 'rxjs'; -import { debounceTime, delay, filter, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators'; +import { delay, filter, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators'; import { MatSelectSearchClearDirective } from './mat-select-search-clear.directive'; +/** The max height of the select's overlay panel. */ +const SELECT_PANEL_MAX_HEIGHT = 256; + /* tslint:disable:member-ordering component-selector */ /** * Component providing an input field for searching MatSelect options. @@ -247,8 +250,6 @@ export class MatSelectSearchComponent implements OnInit, OnDestroy, ControlValue this._formControl.valueChanges, this.optionsLength$ ]).pipe( - // avoid "expression has been changed" error - debounceTime(0), map(([value, optionsLength]) => this.noEntriesFoundLabel && value && optionsLength === this.getOptionsLengthOffset()) ); diff --git a/src/app/mat-select-search/ngx-mat-select-search.module.ts b/src/app/mat-select-search/ngx-mat-select-search.module.ts index b07632c..402bd2c 100755 --- a/src/app/mat-select-search/ngx-mat-select-search.module.ts +++ b/src/app/mat-select-search/ngx-mat-select-search.module.ts @@ -17,7 +17,7 @@ import { CommonModule } from '@angular/common'; import { MatSelectSearchClearDirective } from './mat-select-search-clear.directive'; import { ReactiveFormsModule } from '@angular/forms'; -export const MatSelectSearchVersion = '3.2.0'; +export const MatSelectSearchVersion = '3.2.1'; @NgModule({