How to use the @sanity/observable.forkJoin function in @sanity/observable

To help you get started, we’ve selected a few @sanity/observable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / form-builder / src / sanity / inputs / ReferenceSelect.js View on Github external
.switchMap(items => {
      return Observable.forkJoin(items.map(item => {
        const memberType = referenceType.to.find(ofType => ofType.type.name === item._type)
        return observeForPreview(item, memberType)
          .map(result => result.snapshot)
          .first()
      }))
    })
}

@sanity/observable

[deprecated] This package exists for legacy reasons only

MIT
Latest version published 4 years ago

Package Health Score

78 / 100
Full package analysis