diff --git a/addon/components/country-select.hbs b/addon/components/country-select.hbs
index d6e56cd..830a027 100644
--- a/addon/components/country-select.hbs
+++ b/addon/components/country-select.hbs
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/addon/components/country-select.js b/addon/components/country-select.js
index 0679b37..ff95f38 100644
--- a/addon/components/country-select.js
+++ b/addon/components/country-select.js
@@ -4,7 +4,6 @@ import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import { task } from 'ember-concurrency';
-import { later } from '@ember/runloop';
export default class CountrySelectComponent extends Component {
@service fetch;
@@ -14,6 +13,10 @@ export default class CountrySelectComponent extends Component {
@tracked value;
@tracked id = guidFor(this);
+ get renderInPlace() {
+ return this.args.renderInPlace ?? true;
+ }
+
constructor(owner, { value = null, disabled = false }) {
super(...arguments);
this.disabled = disabled;
@@ -23,10 +26,12 @@ export default class CountrySelectComponent extends Component {
@task *fetchCountries(value = null) {
try {
- this.countries = yield this.fetch.get('lookup/countries', { columns: ['name', 'cca2', 'flag', 'emoji'] });
- if (value) {
- this.selected = this.findCountry(value);
- }
+ this.countries = yield this.fetch.get(
+ 'lookup/countries',
+ { columns: ['name', 'cca2', 'flag', 'emoji'] },
+ { fromCache: true, expirationInterval: 1, expirationIntervalUnit: 'week' }
+ );
+ this.selected = this.findCountry(value);
} catch (error) {
this.countries = [];
}
@@ -40,15 +45,8 @@ export default class CountrySelectComponent extends Component {
}
}
- @action listenForInputChanges(element) {
- later(() => {
- const { value } = element;
-
- if (this.value !== value) {
- this.value = value;
- this.changed(value);
- }
- }, 100);
+ @action handleChange(el, [value]) {
+ this.selected = this.findCountry(value);
}
@action selectCountry(country) {
diff --git a/addon/components/layout/resource/panel.hbs b/addon/components/layout/resource/panel.hbs
index 00a1127..186188a 100644
--- a/addon/components/layout/resource/panel.hbs
+++ b/addon/components/layout/resource/panel.hbs
@@ -8,6 +8,7 @@
@fullHeight={{true}}
@isResizable={{this.isResizable}}
@width={{this.width}}
+ ...attributes
>
{{#if @headerComponent}}
{{component
diff --git a/addon/components/locale-selector-tray.hbs b/addon/components/locale-selector-tray.hbs
index c2a28dc..d3753d0 100644
--- a/addon/components/locale-selector-tray.hbs
+++ b/addon/components/locale-selector-tray.hbs
@@ -16,10 +16,10 @@