[Feature Request] Condition dcc.Link's window.scrollTo(0,0) on a component prop
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 24.4k
- Forks
- 2.3k
- Ø Merge
- 2 T. 7 Std.
- Gemergte PRs (30 T.)
- 13
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit components/dash-core-components/src/components/Link.tsx, insbesondere mit dem Navigationspfad von dcc.Link, der derzeit bedingungslos window.scrollTo(0,0) aufruft. Verfolge, wie die Link-Props definiert und verwendet werden, und überprüfe dann, dass die neue Prop das Scrollen steuern kann, während URL- und Layout-Aktualisierungen erhalten bleiben; das Issue nennt keine Testdatei, die ausgeführt werden soll.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 72/100