Redocly/redoc

Suggestion: configuration option to specify scrolling context/container

开放

#727 创建于 2018年11月28日

 (6 条评论) (0 个反应) (0 位负责人)TypeScript (2,272 个派生)batch import
Type: Enhancementhelp wanted

仓库指标

星标
 (21,877 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南