Redocly/redoc

Suggestion: configuration option to specify scrolling context/container

Open

#727 geöffnet am 28. Nov. 2018

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.272 Forks)batch import
Type: Enhancementhelp wanted

Repository-Metriken

Stars
 (21.877 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I am trying to use ReDoc in a SPA inside a somewhat complex nested view (angular app using ui-router). The problem is the scroll handler in ReDoc seems to be relative to the window object, so in my case it doesn't trigger at all. So menu links are not automatically activated on scrolling etc.

My suggestion is to provide a configuration option to specify the parent scrolling context/container, similar to what other libraries that support scroll detection events have (like waypoints.js, wow.js etc.)

This would help a lot with embedding ReDoc in SPAs in general I think.

Contributor Guide