@aquera/nile-elements 0.0.93 → 0.0.95

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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.0.93",
6
+ "version": "0.0.95",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -233,8 +233,6 @@ export class NileSelect extends NileElement implements NileFormControl {
233
233
 
234
234
  @property({ type: String }) noResultsMessage: string = 'No results found';
235
235
 
236
- @state() hiddenItems: any = [];
237
-
238
236
  /** Gets the validity state object */
239
237
  get validity() {
240
238
  return this.valueInput?.validity;
@@ -317,15 +315,13 @@ export class NileSelect extends NileElement implements NileFormControl {
317
315
 
318
316
  // Hide unselected options if showSelected is true
319
317
  const allOptions = this.getAllOptions();
320
- this.hiddenItems = [];
321
318
  allOptions.forEach(el => {
322
319
  if (!el.selected) {
323
- this.hiddenItems.push(el.value);
324
320
  el.hidden = this.showSelected;
325
321
  }
326
322
  });
327
323
 
328
- this.requestUpdate();
324
+ // this.requestUpdate();
329
325
  }
330
326
 
331
327
  /**
@@ -539,10 +535,6 @@ export class NileSelect extends NileElement implements NileFormControl {
539
535
  const target = event.target as HTMLElement;
540
536
  const option = target.closest('nile-option');
541
537
 
542
- if(this.hiddenItems.includes(option?.value)){
543
- return;
544
- }
545
-
546
538
  if (this.blockValueChange && option) {
547
539
  this.emit('nile-block-change', { value: option?.value, name: this.name });
548
540
  this.hide();
@@ -759,13 +751,10 @@ export class NileSelect extends NileElement implements NileFormControl {
759
751
  if (this.selectedOptions.length === 0) {
760
752
  this.showSelected = false;
761
753
  const allOptions = this.getAllOptions();
762
- this.hiddenItems = [];
763
754
  allOptions.forEach(el => {
764
755
  if (!el.selected) {
765
756
  el.hidden = this.showSelected;
766
- } else {
767
- this.hiddenItems.push(el.value);
768
- }
757
+ } else {}
769
758
  });
770
759
 
771
760
  this.requestUpdate();
@@ -882,14 +871,14 @@ export class NileSelect extends NileElement implements NileFormControl {
882
871
  if (this.currentOption) {
883
872
  scrollIntoView(this.currentOption, this.listbox, 'vertical', 'auto');
884
873
  }
874
+ this.searchValue = '';
875
+ this.filterOptions(this.searchValue);
885
876
 
886
877
  this.emit('nile-after-show', { value: this.value, name: this.name });
887
878
  } else {
888
879
  // Hide
889
880
  this.emit('nile-hide', { value: this.value, name: this.name });
890
881
  this.showSelected = false;
891
- this.searchValue = '';
892
- this.filterOptions(this.searchValue);
893
882
  this.removeOpenListeners();
894
883
 
895
884
  await stopAnimations(this);