Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Trigger search when query attr changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lsilvs committed Aug 31, 2018
1 parent b1385bd commit ec44706
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/address/address.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ const AddressConstructor = function ($rootScope, $stateParams, $location, $http,
};

$rootScope.$on('advanced-searchbox:modelUpdated', (event, model) => {
vm.searchModel = model;
if (vm.searchModel.query !== model.query) {
vm.searchModel = Object.assign({}, model);
return onSearchChange();
}

return vm.searchModel = Object.assign({}, model);
});

$rootScope.$on('advanced-searchbox:removedSearchParam', (event, searchParameter) => {
Expand Down

0 comments on commit ec44706

Please sign in to comment.