Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The insertMenu option doesn't work with an array of references. #7816

Open
koalita-corsica opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@koalita-corsica
Copy link

koalita-corsica commented Nov 14, 2024

If you find a security vulnerability, do NOT open an issue. Email [email protected] instead.

Describe the bug

The insertMenu option doesn't work with and array of reference.

To Reproduce

Steps to reproduce the behavior:

  1. Create a document with an array of reference
  2. Add the InsertMenu as an option
  3. See it not being applied

Code example of a field not working:

{
      name: 'subitems',
      
      title: 'Pages du sous-menu',
      
      type: 'array',
      
      of: [{ 
      
        type: 'reference', 
        
        to: [
        
          { type: 'pages' },

          { type: 'formations'}
          
        ],      
        
      }],
      
      options: {
      
              insertMenu: {
              
          showIcons: false,
          
        }
        
      }
      
    }

Expected behavior

Being able to use the insertMenu options

Screenshots
Capture d’écran 2024-11-14 à 16 17 30

Which versions of Sanity are you using?

`npx sanity versions

@sanity/cli (global)          3.64.1 (up to date)

@sanity/color-input            4.0.1 (up to date)

@sanity/eslint-config-studio   4.0.0 (up to date)

@sanity/locale-fr-fr          1.2.12 (up to date)

@sanity/vision                3.64.1 (up to date)

sanity                        3.64.1 (up to date)
`

What operating system are you using?

macOS 14.6.1

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

10.1.0
v20.9.0

Additional context

Coming here after trying to solve the issue using the kapa.ai bot feature in the slack channel.
If it was not the correct way to speak about this issue please tell me what it would be

Security issue?

//

@koalita-corsica koalita-corsica changed the title The insertMenu option doesn't work with and array of references. The insertMenu option doesn't work with an array of references. Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant