@aquera/nile-elements 0.0.94 → 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.94",
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,18 +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
- if(!this.showSelected){
328
- this.hiddenItems=[]
329
- }
330
323
 
331
- this.requestUpdate();
324
+ // this.requestUpdate();
332
325
  }
333
326
 
334
327
  /**
@@ -542,10 +535,6 @@ export class NileSelect extends NileElement implements NileFormControl {
542
535
  const target = event.target as HTMLElement;
543
536
  const option = target.closest('nile-option');
544
537
 
545
- if(this.hiddenItems.includes(option?.value)){
546
- return;
547
- }
548
-
549
538
  if (this.blockValueChange && option) {
550
539
  this.emit('nile-block-change', { value: option?.value, name: this.name });
551
540
  this.hide();
@@ -762,13 +751,10 @@ export class NileSelect extends NileElement implements NileFormControl {
762
751
  if (this.selectedOptions.length === 0) {
763
752
  this.showSelected = false;
764
753
  const allOptions = this.getAllOptions();
765
- this.hiddenItems = [];
766
754
  allOptions.forEach(el => {
767
755
  if (!el.selected) {
768
756
  el.hidden = this.showSelected;
769
- } else {
770
- this.hiddenItems.push(el.value);
771
- }
757
+ } else {}
772
758
  });
773
759
 
774
760
  this.requestUpdate();
@@ -885,15 +871,14 @@ export class NileSelect extends NileElement implements NileFormControl {
885
871
  if (this.currentOption) {
886
872
  scrollIntoView(this.currentOption, this.listbox, 'vertical', 'auto');
887
873
  }
874
+ this.searchValue = '';
875
+ this.filterOptions(this.searchValue);
888
876
 
889
877
  this.emit('nile-after-show', { value: this.value, name: this.name });
890
878
  } else {
891
879
  // Hide
892
880
  this.emit('nile-hide', { value: this.value, name: this.name });
893
881
  this.showSelected = false;
894
- this.hiddenItems = [];
895
- this.searchValue = '';
896
- this.filterOptions(this.searchValue);
897
882
  this.removeOpenListeners();
898
883
 
899
884
  await stopAnimations(this);