You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue when I was trying to restore data in my angular-advanced-searchbox model.
My model was quite simple. It contained properties by default with multiple values like this example:
{mySearchParam:['value1', 'value2']}
But in this situation, the system failed with a circular trouble.
I fixed it by replacing code in the restoreModel function stored in the angular-advanced-searchbox-tpls.js file.
I replaced...
// if (searchParam !== undefined)
// $scope.addSearchParam(searchParam, value, false);
...by:
if (searchParam !== undefined){
if(angular.isArray(value)){
for(var key in value){
$scope.addSearchParam(searchParam, value[key], false);
}
}
else{
$scope.addSearchParam(searchParam, value, false);
}
}
It's probably not the best solution, but it works for me.
Maybe dnauck will be inspired by this idea ;)
Gagjules
The text was updated successfully, but these errors were encountered:
Hello there.
I had an issue when I was trying to restore data in my angular-advanced-searchbox model.
My model was quite simple. It contained properties by default with multiple values like this example:
{mySearchParam:['value1', 'value2']}
But in this situation, the system failed with a circular trouble.
I fixed it by replacing code in the restoreModel function stored in the angular-advanced-searchbox-tpls.js file.
I replaced...
// if (searchParam !== undefined)
// $scope.addSearchParam(searchParam, value, false);
...by:
if (searchParam !== undefined){
if(angular.isArray(value)){
for(var key in value){
$scope.addSearchParam(searchParam, value[key], false);
}
}
else{
$scope.addSearchParam(searchParam, value, false);
}
}
It's probably not the best solution, but it works for me.
Maybe dnauck will be inspired by this idea ;)
Gagjules
The text was updated successfully, but these errors were encountered: