sanity icon indicating copy to clipboard operation
sanity copied to clipboard

Studio not passing 'viewOptions' into preview prepare() function

Open bjornwang opened this issue 5 years ago • 4 comments

Describe the bug

Following the example to tailor the preview to the active sort order as described in the docs, Studio is not passing in viewOptions: https://www.sanity.io/docs/sort-orders#conditionally-render-a-preview-based-on-current-sort-option-d040558b4093

This bug is also discussed on Slack where others are experiencing the same: https://app.slack.com/client/T9Y440GN8/threads/thread/C9Z7RC3V1-1579984491.176500

bjornwang avatar Jan 30 '20 18:01 bjornwang

Hey! What is the current status of this, or is there a workaround? 😃

We disabled most orderings for now, because we found it more confusing than helpful if the previews do not adjust.

andre-brdoch avatar Jan 29 '21 16:01 andre-brdoch

Still a bug, viewOptions are not passed

j2is avatar Apr 05 '21 14:04 j2is

I am missing this functionality too :-/

tarjelavik avatar Sep 30 '21 13:09 tarjelavik

Bumping this... wondering why it hasn't been resolved after over 2 years have passed?

TheRealFlyingCoder avatar Sep 06 '22 02:09 TheRealFlyingCoder

Bumping this once again. Just wasted a lot of time trying to get this to work, only to realize this has been a long standing bug that is not reflected in the docs.

olach avatar Oct 31 '23 13:10 olach