diff --git a/client/core/src/components/autocomplete/autocomplete.js b/client/core/src/components/autocomplete/autocomplete.js index e91b9ff6a..5cd812510 100755 --- a/client/core/src/components/autocomplete/autocomplete.js +++ b/client/core/src/components/autocomplete/autocomplete.js @@ -36,6 +36,7 @@ export default class Autocomplete extends Input { this.assignDropdownProps(); this.showField = this.$.dropDown.showField; this.valueField = this.$.dropDown.valueField; + this.refreshSelection(); } get model() { @@ -60,7 +61,6 @@ export default class Autocomplete extends Input { set url(value) { this.dropDownAssign({url: value}); - this.refreshSelection(); } dropDownAssign(props) { diff --git a/client/core/src/components/autocomplete/autocomplete.spec.js b/client/core/src/components/autocomplete/autocomplete.spec.js index aaa948b70..847761179 100644 --- a/client/core/src/components/autocomplete/autocomplete.spec.js +++ b/client/core/src/components/autocomplete/autocomplete.spec.js @@ -47,14 +47,6 @@ describe('Component vnAutocomplete', () => { expect(controller.selection).toEqual(data); }); - it(`should perform a query if the item id isn't present in the data property`, inject($httpBackend => { - $httpBackend.whenGET(/testUrl.*/).respond([data]); - controller.url = 'testUrl'; - $httpBackend.flush(); - - expect(controller.selection).toEqual(data); - })); - it(`should set selection to null when can't find an existing item in the data property`, () => { expect(controller.selection).toEqual(null); });