Fix AW-1056, AW-1080
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

feature/MinimizeSolution
Willem Dantuma 2020-03-26 14:29:18 +01:00
parent 8db1edb262
commit bc17f80050
2 changed files with 4 additions and 3 deletions

View File

@ -192,7 +192,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
newQueryState = this.serializeService.deserialize(queryState);
queryState = this.serializeService.serialize(newQueryState);
}
queryStateChanged = this.serializeService.serialize(lastQueryState) != queryState;
queryStateChanged = this.serializeService.serialize(lastQueryState) != queryState || setStateCount==0;
}
let t =0;
if(setStateCount==0) t=600;

View File

@ -149,10 +149,11 @@ export class MapEffects {
selectItem$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEM),
withLatestFrom(this.store$.select(mapReducers.selectGetSelectedItem)),
switchMap(([action, selectedItem]) => {
withLatestFrom(this.store$.select(mapReducers.getSetStateCount)),
switchMap(([[action, selectedItem],setStateCount]) => {
let a = action as mapActions.SelectItem;
let itemCode = selectedItem ? selectedItem.code : "";
if (a.itemCode != itemCode) {
if (a.itemCode != itemCode || setStateCount == 1) {
return this.itemService$.getItem(a.itemCode).pipe(
map((item: IItem) => new mapActions.SelectItemSuccess(item)),
catchError(error => of(new commonActions.Fail(error))))