✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

How to remove annoying weak references in an editor

2 replies
Last updated: May 22, 2023
these are pretty annoying. How can I make it so they are removable right from the editorBasically I want these references to be removed too when I delete the referenced documents themselves. Instead of hanging there... pointlessly. I think that would be a common use case and there should be built-in solution ?
May 22, 2023, 2:07 AM
Are you using "weak" references? Usually, you can't delete a document if there are references. That said, you could create a custom input component or a type of listener action to accomplish this.
May 22, 2023, 2:29 AM
Yes weak references. Okay I don't know what they are but I'll look into those solutions tomorrow.
May 22, 2023, 2:33 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?