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

UContentNavigation can't handle custom active states #3266

Open
stijns96 opened this issue Feb 7, 2025 · 1 comment
Open

UContentNavigation can't handle custom active states #3266

stijns96 opened this issue Feb 7, 2025 · 1 comment
Labels
bug Something isn't working pro triage v3 #1289

Comments

@stijns96
Copy link

stijns96 commented Feb 7, 2025

Environment

  • Operating System: Darwin
  • Node Version: v20.10.0
  • Nuxt Version: 3.15.4
  • CLI Version: 3.21.1
  • Nitro Version: 2.10.4
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, future, devtools, modules, css
  • Runtime Modules: @nuxt/[email protected], @nuxt/[email protected]
  • Build Modules: -

Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.0.0-alpha.12

Reproduction

<script setup>
const route = useRoute();

const navigation = ref([
  {
    title: 'Announcement bar',
    to: {
      path: route.path,
      query: {
        ...route.query,
        collection: 'Announcement bar'
      }
    },
    active: true
  },
  {
    title: 'Hero',
    to: {
      path: route.path,
      query: {
        ...route.query,
        collection: 'Hero'
      }
    },
    active: false
  }
])
</script>

<template>
  <UContentNavigation :navigation="navigation" variant="link" />

  <pre>
    {{ navigation }}
  </pre>
</template>

Description

In V2 I could make links active by query values. Somehow in V3 it looks like it fully ignores my current active state. Even tho the values are hardcoded now.

Additional context

No response

Logs

@stijns96 stijns96 added bug Something isn't working triage v3 #1289 labels Feb 7, 2025
@stijns96
Copy link
Author

stijns96 commented Feb 9, 2025

Looks like removing active and add exactQuery: 'partial' does the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pro triage v3 #1289
Projects
None yet
Development

No branches or pull requests

2 participants