@aquera/nile-elements 0.0.6-3 → 0.0.6-5

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.6-3",
6
+ "version": "0.0.6-5",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -865,6 +865,11 @@ export class NileSelect extends NileElement implements NileFormControl {
865
865
  this.displayInput.blur();
866
866
  }
867
867
 
868
+ onInputChange(event: Event) {
869
+ // This will stop the event from bubbling up to the parent `nile-select` component
870
+ event.stopPropagation();
871
+ }
872
+
868
873
  render() {
869
874
  const hasLabelSlot = this.hasSlotController.test('label');
870
875
  const hasHelpTextSlot = this.hasSlotController.test('help-text');
@@ -1068,7 +1073,6 @@ export class NileSelect extends NileElement implements NileFormControl {
1068
1073
  @mouseup=${this.handleOptionClick}
1069
1074
  @slotchange=${this.handleDefaultSlotChange}
1070
1075
  >
1071
-
1072
1076
  ${this.optionsLoading
1073
1077
  ? html`
1074
1078
  <span class="select__loader">
@@ -1079,7 +1083,6 @@ export class NileSelect extends NileElement implements NileFormControl {
1079
1083
  </span>
1080
1084
  `
1081
1085
  : ''}
1082
-
1083
1086
  ${this.searchEnabled
1084
1087
  ? html` <div class="select__search">
1085
1088
  <nile-input
@@ -1090,6 +1093,7 @@ export class NileSelect extends NileElement implements NileFormControl {
1090
1093
  @nile-input=${this.handleSearchChange}
1091
1094
  @nile-focus=${this.handleSearchFocus}
1092
1095
  @nile-blur=${this.handleSearchBlur}
1096
+ @nile-change="${this.onInputChange}"
1093
1097
  >
1094
1098
  <nile-icon name="search" slot="suffix"> </nile-icon>
1095
1099
  </nile-input>
@@ -1122,9 +1126,13 @@ export class NileSelect extends NileElement implements NileFormControl {
1122
1126
  &nbsp; Show Selected</nile-checkbox
1123
1127
  >
1124
1128
  </span>
1125
- <span class="select__clear" @click="${this.unSlectAll}"
1126
- >clear all</span
1127
- >
1129
+ ${this.selectedOptions.length !== 0
1130
+ ? html` <span
1131
+ class="select__clear"
1132
+ @click="${this.unSlectAll}"
1133
+ >clear all</span
1134
+ >`
1135
+ : ``}
1128
1136
  </div>`
1129
1137
  : ``}
1130
1138
  </div>