nuxt / nuxt/ui

Add "scroll-region" attribute to DashboardPanel for Inertia compatibility

Open Beginner friendly
#5,676 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
  • Operating System: Linux 6.8.0-88-generic
  • Node Version: v22.21.0
  • Nuxt CLI version: 3.31.2
  • Package Manager: npm 11.6.4
  • Builder: vite 7.2.6
Is this bug related to Nuxt or Vue?

Vue

Package

v4.x

Version

4.0.0

Reproduction

https://inertiajs.com/docs/v2/advanced/scroll-management#scroll-regions

Description

Inertia "preserveScroll" attribute in forms and manual router visits doesn't work as expected because the [data-body="slot"] div element in DashboardPanel.vue doesn't have the attribute scroll-region="" as they say in their docs. Adding this attribute solves the problem:

<div data-slot="body" :class="ui.body({ class: props.ui?.body })" scroll-region="">
  <slot name="body" />
</div>

Thanks for your amazing lib. Regards.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open DashboardPanel.vue and compare the body slot element with Inertia’s linked scroll-region documentation. Verify the required attribute name and check the existing component structure before making the small compatibility change. Done means Inertia preserveScroll works for forms and manual visits without losing the dashboard’s scroll position.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript, vite
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.