Reputation: 1
I would like to achieve the same thing than below in a smartest way :
charteringsPassFromZeroToOneEmpty$
.pipe(
withLatestFrom(transportFeatures$),
map(
([nothing, transportFeatures]: [
void,
Partial<TransportFeatures>
]) => transportFeatures
)
)
Each obervable is made with "valueChange()", in Angular reactive forms. I have tried sample(), throttle() and switchMap(), nothing is working. Does anyone has an idea ?
Upvotes: 0
Views: 174
Reputation: 56650
How about combineLatest
This is the best I can come up with the details provided.
combineLatest(charteringsPassFromZeroToOneEmpty$, transportFeatures$, firstCharteringWithfirstLoadingLastDelivery$).pipe(
filter(
([nothing, transportFeatures]: [
void,
Partial<TransportFeatures>
]) => transportFeatures?.multimodal === false
),
map(
([nothing, transportFeatures]: [
void,
Partial<TransportFeatures>
]) => transportFeatures
),
takeUntil(this._onDestroy$)
)
Upvotes: 0