@alauda/ui 6.5.4-beta.16 → 6.5.4-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7542,6 +7542,7 @@ class BaseSelect extends CommonFormControl {
7542
7542
  super(...arguments);
7543
7543
  this.filterFn = this._filterFn.bind(this);
7544
7544
  this.trackFn = this._trackFn;
7545
+ this.clearFilterOnHide = true;
7545
7546
  this.loading = false;
7546
7547
  this.placeholder = '';
7547
7548
  this.defaultFirstOption = true;
@@ -7556,7 +7557,6 @@ class BaseSelect extends CommonFormControl {
7556
7557
  this._clearable = false;
7557
7558
  this._allowCreate = false;
7558
7559
  this._filterString = '';
7559
- this._isOptionsHidden = true;
7560
7560
  this.destroy$$ = new Subject();
7561
7561
  this.size$$ = new BehaviorSubject(this.size);
7562
7562
  this.filterString$$ = new BehaviorSubject(this.filterString);
@@ -7610,9 +7610,7 @@ class BaseSelect extends CommonFormControl {
7610
7610
  if (val !== this._filterString) {
7611
7611
  this._filterString = val;
7612
7612
  this.filterString$$.next(val);
7613
- if (!this._isOptionsHidden) {
7614
- this.filterChange.emit(val);
7615
- }
7613
+ this.filterChange.emit(val);
7616
7614
  }
7617
7615
  }
7618
7616
  ngAfterContentInit() {
@@ -7679,7 +7677,6 @@ class BaseSelect extends CommonFormControl {
7679
7677
  requestAnimationFrame(() => {
7680
7678
  this.autoFocusFirstOption();
7681
7679
  });
7682
- this._isOptionsHidden = false;
7683
7680
  this.show.emit();
7684
7681
  };
7685
7682
  if (this.optionContent) {
@@ -7700,8 +7697,9 @@ class BaseSelect extends CommonFormControl {
7700
7697
  this.optionContent?.detach();
7701
7698
  }
7702
7699
  this.resetFocusedOption();
7703
- this._isOptionsHidden = true;
7704
- this.filterString = '';
7700
+ if (this.clearFilterOnHide) {
7701
+ this.filterString = '';
7702
+ }
7705
7703
  this.hide.emit();
7706
7704
  }
7707
7705
  onInput(event) {
@@ -7817,7 +7815,7 @@ class BaseSelect extends CommonFormControl {
7817
7815
  }
7818
7816
  }
7819
7817
  BaseSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseSelect, deps: null, target: i0.ɵɵFactoryTarget.Directive });
7820
- BaseSelect.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseSelect, inputs: { size: "size", filterable: "filterable", clearable: "clearable", filterFn: "filterFn", trackFn: "trackFn", labelFn: "labelFn", allowCreate: "allowCreate", loading: "loading", placeholder: "placeholder", defaultFirstOption: "defaultFirstOption", lazy: "lazy" }, outputs: { filterChange: "filterChange", show: "show", hide: "hide" }, queries: [{ propertyName: "optionContent", first: true, predicate: OptionContentDirective, descendants: true }, { propertyName: "contentOptions", predicate: OptionComponent, descendants: true }], viewQueries: [{ propertyName: "selectRef", first: true, predicate: ["selectRef"], descendants: true, static: true }, { propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true, static: true }, { propertyName: "optionListRef", first: true, predicate: ["optionListRef"], descendants: true }, { propertyName: "inputtingOption", first: true, predicate: ["inputtingOption"], descendants: true }, { propertyName: "customOptions", predicate: OptionComponent, descendants: true }], usesInheritance: true, ngImport: i0 });
7818
+ BaseSelect.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: BaseSelect, inputs: { size: "size", filterable: "filterable", clearable: "clearable", filterFn: "filterFn", trackFn: "trackFn", labelFn: "labelFn", clearFilterOnHide: "clearFilterOnHide", allowCreate: "allowCreate", loading: "loading", placeholder: "placeholder", defaultFirstOption: "defaultFirstOption", lazy: "lazy" }, outputs: { filterChange: "filterChange", show: "show", hide: "hide" }, queries: [{ propertyName: "optionContent", first: true, predicate: OptionContentDirective, descendants: true }, { propertyName: "contentOptions", predicate: OptionComponent, descendants: true }], viewQueries: [{ propertyName: "selectRef", first: true, predicate: ["selectRef"], descendants: true, static: true }, { propertyName: "tooltipRef", first: true, predicate: ["tooltipRef"], descendants: true, static: true }, { propertyName: "optionListRef", first: true, predicate: ["optionListRef"], descendants: true }, { propertyName: "inputtingOption", first: true, predicate: ["inputtingOption"], descendants: true }, { propertyName: "customOptions", predicate: OptionComponent, descendants: true }], usesInheritance: true, ngImport: i0 });
7821
7819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseSelect, decorators: [{
7822
7820
  type: Directive
7823
7821
  }], propDecorators: { size: [{
@@ -7832,6 +7830,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
7832
7830
  type: Input
7833
7831
  }], labelFn: [{
7834
7832
  type: Input
7833
+ }], clearFilterOnHide: [{
7834
+ type: Input
7835
7835
  }], allowCreate: [{
7836
7836
  type: Input
7837
7837
  }], loading: [{