sanity icon indicating copy to clipboard operation
sanity copied to clipboard

List Previews search ignores reference fields in subtitle section

Open WebShapedBiz opened this issue 1 year ago • 1 comments

I'm not sure if this is a bug or a feature so please forgive me if I'm wrong

Describe the bug

As the title says, the List Preview search ignores reference fields in the subtitle section of a List item, while works fine with regular fields

To Reproduce

Steps to reproduce the behavior:

  1. Create a schema with a reference field
  2. Use that reference field in the subtitle section of a List item
  3. Use the regular field in the subtitle section of a List item
  4. Search for that reference field -> No results
  5. Search for the regular field -> Search result

Expected behavior

I believe that the reference fields should not be discriminated by the search functionality

Which versions of Sanity are you using?

v3.14.1

What operating system are you using?

elementaryOS Jolnir (Ubuntu 20.04.6 LTS based)

Which versions of Node.js / npm are you running?

npm: v9.5.1 node: v18.16.0

WebShapedBiz avatar Aug 01 '23 19:08 WebShapedBiz

We are struggling with this same issue. Please consider making referenced fields searchable, at least when some content of the referenced field is explicitly displayed in the list item's title or subtitle fields.

I'm sure this used to work this way in older versions on Sentry Studio.

It is surprising when you can have a list item with a title derived from e.g a referenced Page document that displays "Some page title" as the item title in the listing view, but you cannot find it by searching for that same title.

jmurty avatar Apr 09 '24 01:04 jmurty

We are having the exact issue as well. We spent the time getting the expanded reference field data worked into the preview subtitle to find out that the search could not acknowledge it.

jonas-davidson avatar Jul 08 '24 14:07 jonas-davidson