Fix AW-1056, AW-1080
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
@@ -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))))
|
||||
|
Reference in New Issue
Block a user