@ember-eui/core 4.2.5 → 4.2.6

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ### Master
4
4
 
5
+ ### 4.2.6
6
+ 🐛 Bug / Fixes
7
+ `@ember-eui/core`
8
+ - `<EuiComboBox />` fix css and html issues for amsterdam theme
9
+ - `{{use-state}}` schedule changes for afterRender
10
+
5
11
  ### 4.2.5
6
12
  🐛 Bug / Fixes
7
13
  `@ember-eui/core`
@@ -1,5 +1,18 @@
1
- <EuiText class="pa-8 euiComboBoxOption" {{on "click" @onCreateOption}}>
2
- {{this.formattedString}}
3
- <span class="flex-1"></span>
4
- <EuiIcon @type="returnKey" />
5
- </EuiText>
1
+ <div
2
+ role="button"
3
+ class="euiComboBoxOptionsList__rowWrap"
4
+ {{on "click" @onCreateOption}}
5
+ >
6
+ <EuiText class="euiComboBoxOptionsList__empty" @size="xs">
7
+ <div class="euiComboBoxOption__contentWrapper">
8
+ <p class="euiComboBoxOption__emptyStateText">
9
+ {{this.formattedString}}
10
+ </p>
11
+ <EuiBadge
12
+ @iconType="returnKey"
13
+ class="euiComboBoxOption__enterBadge"
14
+ @color="hollow"
15
+ />
16
+ </div>
17
+ </EuiText>
18
+ </div>
@@ -80,7 +80,7 @@
80
80
  )
81
81
  (component "eui-combo-box/no-matches-message")
82
82
  }}
83
- @dropdownClass="euiComboBoxOptionsList euiPanel euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel-isAttached euiPopover__panel-noArrow euiPopover__panel--bottom euiPopover__panel-isOpen euiComboBoxOptionsList__rowWrap {{@dropdownClass}}"
83
+ @dropdownClass="euiComboBoxOptionsList euiPanel euiPanel--borderRadiusMedium euiPanel--noShadow euiPanel--plain euiPopover__panel euiPopover__panel--bottom euiPopover__panel-isAttached euiPopover__panel-isOpen euiPopover__panel-noArrow {{@dropdownClass}}"
84
84
  as |option i|
85
85
  >
86
86
  {{yield option i}}
@@ -1,6 +1,7 @@
1
1
  import { helper } from '@ember/component/helper';
2
2
  import { action } from '@ember/object';
3
3
  import { tracked } from '@glimmer/tracking';
4
+ import { scheduleOnce } from '@ember/runloop';
4
5
 
5
6
  /**
6
7
  * @param value - initial value to use, undefined if not provided.
@@ -17,7 +18,10 @@ class SingleUseState<T> {
17
18
 
18
19
  @action
19
20
  setState(value: T): T {
20
- this.value = value;
21
+ const updater = () => {
22
+ this.value = value;
23
+ };
24
+ scheduleOnce('afterRender', this, updater);
21
25
  return value;
22
26
  }
23
27
  }
@@ -7,17 +7,18 @@ order: 2
7
7
  Using on create options for bubbling new option and handling in onCreateOption function, you may want to provide a customOptionText, you can assume {searchText} will be interpolated, be sure sanitize your string!
8
8
 
9
9
  ```hbs template
10
- <EuiComboBox
11
- @onChange={{this.onChange}}
12
- @options={{this.remainingOptions}}
13
- @onCreateOption={{this.onCreateOption}}
14
- @selectedOptions={{this.selected}}
15
- @searchEnabled={{true}}
16
- @customOptionText="Do you want to add&nbsp;{searchText}&nbsp;to your list?"
17
- @searchField="label"
18
- as |option item|>
19
- {{option.label}}
20
- </EuiComboBox>
10
+ <EuiComboBox
11
+ @onChange={{this.onChange}}
12
+ @options={{this.remainingOptions}}
13
+ @onCreateOption={{this.onCreateOption}}
14
+ @selectedOptions={{this.selected}}
15
+ @searchEnabled={{true}}
16
+ @customOptionText='Do you want to add&nbsp;<strong>{searchText}</strong>&nbsp;to your list?'
17
+ @searchField='label'
18
+ as |option item|
19
+ >
20
+ {{option.label}}
21
+ </EuiComboBox>
21
22
  ```
22
23
 
23
24
  ```javascript component
@@ -59,10 +60,13 @@ export default class Demo1 extends Component {
59
60
  const newOptionStructure = {
60
61
  value: `${newOption}`,
61
62
  label: `${newOption}`
62
- }
63
- if(this.options.filter( opt => opt.value == newOptionStructure.value).length == 0){
64
- this.options.addObject(newOptionStructure)
65
- this.selected.addObject(newOptionStructure)
63
+ };
64
+ if (
65
+ this.options.filter((opt) => opt.value == newOptionStructure.value)
66
+ .length == 0
67
+ ) {
68
+ this.options.addObject(newOptionStructure);
69
+ this.selected.addObject(newOptionStructure);
66
70
  }
67
71
  }
68
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -95,8 +95,8 @@
95
95
  "devDependencies": {
96
96
  "@ember/optional-features": "^2.0.0",
97
97
  "@ember/test-helpers": "^2.6.0",
98
- "@embroider/test-setup": "^1.0.0",
99
- "@embroider/util": "^1.3.0",
98
+ "@embroider/test-setup": "^1.5.0",
99
+ "@embroider/util": "^1.5.0",
100
100
  "@glimmer/component": "^1.0.4",
101
101
  "@glimmer/tracking": "^1.0.4",
102
102
  "@types/ember": "^3.16.0",
@@ -176,5 +176,5 @@
176
176
  "volta": {
177
177
  "extends": "../../package.json"
178
178
  },
179
- "gitHead": "734349b17f552bf40db786c1b38270abcdce3952"
179
+ "gitHead": "51a380951b0363dce230f006006183275fc46ddf"
180
180
  }