[Feature Request] Condition dcc.Link's window.scrollTo(0,0) on a component prop
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe.
Occasionally a dcc.Link will update the URL, though only some portion of the layout will be updated. However, the page will still scroll to the top.
Describe the solution you'd like
dcc.Link currently calls window.scrollTo(0,0) unconditionally. It could be nice for that to be conditional, perhaps controlled by a prop.
Describe alternatives you've considered
None.
Additional context
None.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with components/dash-core-components/src/components/Link.tsx, especially the dcc.Link navigation path that currently calls window.scrollTo(0,0) unconditionally. Trace how Link props are defined and consumed, then verify that the new prop can control scrolling while preserving URL and layout updates; the issue does not name a test file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100